...
You can also use this class to perform date-time operations, such as calculations, formatting or converting between date-time formats.
Метод | Описание метода |
isValid() | Описание:Валидация корректной даты и времени. Принимает:Ничего. Example: var first_simple_date_time = new SimpleDateTime("2019-01-01 08:00:00"); |
setDisplayValue(dateTime, format) | Описание:Устанавливает DateTime с учетом пользовательской тайм-зоны. Принимает:dateTime - string, опционально: format - string (по умолчанию - null). Example: var first_simple_date_time = new SimpleDateTime("2019-01-01 08:00:00"); |
setValue(dateTime) | Описание: Устанавливает дату и время объекта SimpleDateTime. Принимает:
Возвращает: Ничего. Example: var first_simple_date_time = new SimpleDateTime("2019-01-01 08:00:00"); |
subtract(first, second) | Описание:Отнимает от текущего времени либо возвращает разницу между переданными объектами SimpleDateTime. Принимает:
Возвращает: объект SimpleDuration Example: var simple_date_time = new SimpleDateTime("2019-01-01 08:00:00"); var simple_time = new SimpleTime(); simple_date_time.subtract(simple_time); var second_simple_time = simple_date_time.getTime(); |
...