Interface CalendarInterval.Builder

  • Method Details

    • startTime

      CalendarInterval.Builder startTime(Instant startTime)

      The date and time when you want the first interval to start. Be sure to choose a time that configures the intervals the way that you want. For example, if you want weekly intervals starting on Mondays at 6 a.m., be sure to specify a start time that is a Monday at 6 a.m.

      When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: 1698778057

      As soon as one calendar interval ends, another automatically begins.

      Parameters:
      startTime - The date and time when you want the first interval to start. Be sure to choose a time that configures the intervals the way that you want. For example, if you want weekly intervals starting on Mondays at 6 a.m., be sure to specify a start time that is a Monday at 6 a.m.

      When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: 1698778057

      As soon as one calendar interval ends, another automatically begins.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • durationUnit

      CalendarInterval.Builder durationUnit(String durationUnit)

      Specifies the calendar interval unit.

      Parameters:
      durationUnit - Specifies the calendar interval unit.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • durationUnit

      CalendarInterval.Builder durationUnit(DurationUnit durationUnit)

      Specifies the calendar interval unit.

      Parameters:
      durationUnit - Specifies the calendar interval unit.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • duration

      CalendarInterval.Builder duration(Integer duration)

      Specifies the duration of each calendar interval. For example, if Duration is 1 and DurationUnit is MONTH, each interval is one month, aligned with the calendar.

      Parameters:
      duration - Specifies the duration of each calendar interval. For example, if Duration is 1 and DurationUnit is MONTH, each interval is one month, aligned with the calendar.
      Returns:
      Returns a reference to this object so that method calls can be chained together.