Service for working with a business calendar.

Hierarchy

  • IBusinessCalendarService

Implemented by

Methods

  • Offsets from the specified date/time by the specified number of estimated business days..

    Returns

    New date and time.

    Parameters

    • dateTime: string

      Date and time.

    • daysOffset: number

      Offset in working days. Can be a non-integer number.

    • calendarCardId: string

      Calendar card ID.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<string>

  • Adds the specified working time in quants to the specified date/time.

    Returns

    New date and time.

    Parameters

    • dateTime: string

      Date and time.

    • calendarCardId: string

      Calendar card ID.

    • quants: number

      Working time in quants.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<string>

  • Adds the specified number of actual business days to the specified date/time.

    Returns

    New date and time.

    Parameters

    • dateTime: string

      Date and time.

    • interval: number

      Number of working days.

    • calendarCardId: string

      Calendar card ID.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<string>

  • Retrieves information about calendars.

    Returns Promise<CalendarInfo[]>

  • Retrieves information about a calendar by its numeric identifier.

    Parameters

    • calendarIntId: number

      Calendar numeric identifier.

    Returns Promise<null | CalendarInfo>

  • Calculates working hours between two specified dates.

    Returns

    Working time in quants between two specified dates.

    Parameters

    • dateTimeStart: string

      Start date.

    • dateTimeEnd: string

      End date (must be greater than start date).

    • calendarCardId: string

      Calendar card ID.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<number>

  • Retrieves information about the default calendar.

    Returns Promise<null | CalendarInfo>

  • Retrieves information about the default time zone.

    Returns Promise<null | TimeZoneInfo>

  • Gets the start of the first work quant of the workday, obtained as an offset from the given date.

    Returns

    The date/time in abstract calendar time of the beginning of the first working quant of the working day.

    Parameters

    • dateTime: string

      Date in abstract calendar time.

    • daysOffset: number

      Offset in working days.

    • calendarCardId: string

      Calendar card ID.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<string>

  • Gets the end of the last working quant of the working day, obtained by offset from the given date.

    Returns

    Date\time in abstract calendar time of the end of the last working quant of the working day.

    Parameters

    • dateTime: string

      Date in abstract calendar time.

    • daysOffset: number

      Offset in working days.

    • calendarCardId: string

      Calendar card ID.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<string>

  • Gets calendar information for the specified role.

    Parameters

    • roleId: string

      Role ID.

    Returns Promise<null | CalendarInfo>

  • Retrieves information about the time zone of the specified role.

    Parameters

    • roleId: string

      Role ID.

    Returns Promise<TimeZoneInfo>

  • Checks whether the specified date/time in the abstract calendar time is working date/time.

    Returns

    true if the specified date\time is working; otherwise - false.

    Parameters

    • dateTime: string

      Date and time to check.

    • calendarCardId: string

      Calendar card ID.

    • Optional timeZoneUtcOffsetMinutes: number

      Time zone offset in minutes.

    Returns Promise<boolean>

  • Rebuilds the calendar based on the specified settings, incl. list of exceptions.

    Parameters

    • operationId: string

      Operation ID.

    • calendarCardId: string

      Calendar card ID.

    • Optional rebuildIndexes: boolean

      A sign that indexes in calendars need to be rebuilt.

    Returns Promise<void>

  • Checks the calendar for absence of gaps between quants.

    Returns

    Validation result.

    Parameters

    • calendarCardId: string

      Calendar card ID.

    Returns Promise<ValidationResult>

Generated using TypeDoc