Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TimeUnit

A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units.

Hierarchy

  • TimeUnit

Index

Methods

toDays

  • toDays(): number
  • Returns the number of days, rounded to the greatest integer less than or equal to, the TimeUnit instance.

    Returns number

toHours

  • toHours(): number
  • Returns the number of hours, rounded to the greatest integer less than or equal to, the TimeUnit instance.

    Returns number

toMillis

  • toMillis(): number
  • Returns the number of milliseconds, rounded to the greatest integer less than or equal to, the TimeUnit instance.

    Returns number

toMinutes

  • toMinutes(): number
  • Returns the number of minutes, rounded to the greatest integer less than or equal to, the TimeUnit instance.

    Returns number

toSeconds

  • toSeconds(): number
  • Returns the number of seconds, rounded to the greatest integer less than or equal to, the TimeUnit instance.

    Returns number

Static days

Static hours

Static millis

Static minutes

Static seconds

Generated using TypeDoc