Options
All
  • Public
  • Public/Protected
  • All
Menu

Utility class to work with periods

since

1.0

Hierarchy

  • PeriodUtil

Index

Methods

Static getEarlierDate

  • getEarlierDate(date1: number, date2: number): number
  • Get the earlier date from the given 2 dates

    since

    1.0

    Parameters

    • date1: number

      first date

    • date2: number

      second date

    Returns number

    the earliest date from the given 2 dates

Static getLaterDate

  • getLaterDate(date1: number, date2: number): number
  • Get the latest date from the given 2 dates

    since

    1.0

    Parameters

    • date1: number

      first date

    • date2: number

      second date

    Returns number

    the latest date from the given 2 dates

Static hasOverlap

  • hasOverlap(p1StartTime: number, p1EndTime: number, p2StartTime: number, p2EndTime: number): boolean
  • Returns true if the 2 periods have an overlap greater than 0

    since

    1.0

    Parameters

    • p1StartTime: number

      start time of the first period

    • p1EndTime: number

      end time of the first period

    • p2StartTime: number

      start time of the second period

    • p2EndTime: number

      end time of the second period

    Returns boolean

    true if the 2 periods have an overlap