Table of Contents |
---|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
load(sysId, timeZone)
Parameter(s):
...
...
...
Описание: Инициализирует расписание по sys_id.
Принимает: sysId - integer; (опционально) timeZone - string (по умолчанию - пустая строка).
Возвращает: Ничего.
Пример:
let simple_schedule = new SimpleSchedule();
simple_schedule.load('1');
...
Описание: Возвращает имя расписания.
Принимает: Ничего.
Возвращает: string.
Пример:
let simple_schedule = new SimpleSchedule('1', 'Europe/Moscow');
ss.info(simple_schedule.getName());
...
Описание: Проверяет, есть ли записи для выбранного расписания.
Принимает: Ничего.
Возвращает: boolean.
Пример:
let simple_schedule = new SimpleSchedule('1', 'Europe/Moscow');
ss.info(simple_schedule.isValid());
...
Описание: Определяет, находится ли данное время в текущем расписании.
Принимает: SimpleDateTime.
Возвращает: boolean.
Пример:
let time = new SimpleDateTime();
let simple_schedule = new SimpleSchedule('1', 'Europe/Moscow');
ss.info(simple_schedule.isInSchedule(time));
...
Описание: Определяет, является время рабочим или нет.
Принимает: SimpleDateTime.
Возвращает: boolean.
Пример:
let time = new SimpleDateTime();
let simple_schedule = new SimpleSchedule('1', 'Europe/Moscow');
ss.info(simple_schedule.isWorkingTime(time));
Не выносить в документацию
...
Описание: Устанавливает тайм-зону.
Принимает: string.
Возвращает: Ничего.
Пример:
...
...
...
...
Описание: Определяет, когда истекает указанное рабочее время.
Принимает:startDate - SimpleDateTime, finalWorkingSeconds - integer
Возвращает: false|string.
Пример:
let startDate = new SimpleDateTime('2019-10-25 08:00:00');
let finalWorkingSeconds = 12345;
let simple_schedule = new SimpleSchedule('1', 'Europe/Moscow');
ss.info(simple_schedule.whenWillExpire(startDate, finalWorkingSeconds));
...
Описание: Определяет, сколько времени (в секундах) до времени начала следующего элемента расписания.
Принимает: time - SimpleDateTime; (опционально) timeZone - string (по умолчанию - пустая строка).
Возвращает: integer.
Пример:
let startDate = new SimpleDateTime('2019-10-25 08:00:00');
let simple_schedule = new SimpleSchedule('1', 'Europe/Moscow');
ss.info(simple_schedule.whenNext(startDate));
Parameter(s):
...
Return:
...
Example:
...