Function ceil

  • Returns a new date representing the earliest interval boundary date after or equal to date.

    For example, timeDay.ceil(date) typically returns 12:00 AM local time on the date following the given date.

    This method is idempotent: if the specified date is already ceilinged to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the maximum expressible value of the associated interval, such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date.

    Parameters

    • date: Date

      A date object.

    Returns Date