Cutwater

Cutwater

  • Docs
  • Help
  • GitHub

TimeUnit

@codification/cutwater-core > TimeUnit

Class

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

beta:

Hierarchy

TimeUnit

Methods

  • toDays
  • toHours
  • toMillis
  • toMinutes
  • toSeconds
  • days
  • hours
  • millis
  • minutes
  • seconds

Methods

toDays

▸ toDays(): number

Defined in TimeUnit.ts:105

Returns the number of days, rounded to the greatest integer less than or equal to, the TimeUnit instance.

Returns: number the number of days


toHours

▸ toHours(): number

Defined in TimeUnit.ts:95

Returns the number of hours, rounded to the greatest integer less than or equal to, the TimeUnit instance.

Returns: number the number of hours


toMillis

▸ toMillis(): number

Defined in TimeUnit.ts:65

Returns the number of milliseconds, rounded to the greatest integer less than or equal to, the TimeUnit instance.

Returns: number the number of milliseconds


toMinutes

▸ toMinutes(): number

Defined in TimeUnit.ts:85

Returns the number of minutes, rounded to the greatest integer less than or equal to, the TimeUnit instance.

Returns: number the number of minutes


toSeconds

▸ toSeconds(): number

Defined in TimeUnit.ts:75

Returns the number of seconds, rounded to the greatest integer less than or equal to, the TimeUnit instance.

Returns: number the number of seconds


<Static> days

▸ days(count: number): TimeUnit

Defined in TimeUnit.ts:15

Returns a TimeUnit representing the specified number of days.

Parameters:

NameTypeDescription
countnumberthe number of days

Returns: TimeUnit a Timeunit representing the number of days


<Static> hours

▸ hours(count: number): TimeUnit

Defined in TimeUnit.ts:25

Returns a TimeUnit representing the specified number of hours.

Parameters:

NameTypeDescription
countnumberthe number of hours

Returns: TimeUnit a Timeunit representing the number of hours


<Static> millis

▸ millis(count: number): TimeUnit

Defined in TimeUnit.ts:35

Returns a TimeUnit representing the specified number of milliseconds.

Parameters:

NameTypeDescription
countnumberthe number of milliseconds

Returns: TimeUnit a Timeunit representing the number of milliseconds


<Static> minutes

▸ minutes(count: number): TimeUnit

Defined in TimeUnit.ts:45

Returns a TimeUnit representing the specified number of minutes.

Parameters:

NameTypeDescription
countnumberthe number of minutes

Returns: TimeUnit a Timeunit representing the number of minutes


<Static> seconds

▸ seconds(count: number): TimeUnit

Defined in TimeUnit.ts:55

Returns a TimeUnit representing the specified number of seconds.

Parameters:

NameTypeDescription
countnumberthe number of seconds

Returns: TimeUnit a Timeunit representing the number of seconds


  • Class
  • Hierarchy
    • Methods
  • Methods
    • toDays
    • toHours
    • toMillis
    • toMinutes
    • toSeconds
    • `` days
    • `` hours
    • `` millis
    • `` minutes
    • `` seconds
Cutwater
Docs
Getting Started
Community
Stack Overflow
More
GitHubStar
Copyright © 2019 Codification.org