Home Reference Source
public class | source

Time

Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date. Created Time objects are frozen with Object.freeze() in constructor and thus immutable.

Static Method Summary

Static Public Methods
public static

fromStandardDate(standardDate: global.Date, nanosecond: Integer | number | undefined): Time

Create a time object from the given standard JavaScript Date and optional nanoseconds.

Constructor Summary

Public Constructor
public

constructor(hour: Integer | number, minute: Integer | number, second: Integer | number, nanosecond: Integer | number, timeZoneOffsetSeconds: Integer | number)

Member Summary

Public Members
public

hour: *

public

minute: *

public
public

second: *

public

Method Summary

Public Methods
public

toString(): *

Static Public Methods

public static fromStandardDate(standardDate: global.Date, nanosecond: Integer | number | undefined): Time source

Create a time object from the given standard JavaScript Date and optional nanoseconds. Year, month and day components of the given date are ignored.

Params:

NameTypeAttributeDescription
standardDate global.Date

the standard JavaScript date to convert.

nanosecond Integer | number | undefined

the optional amount of nanoseconds.

Return:

Time

new time.

Public Constructors

public constructor(hour: Integer | number, minute: Integer | number, second: Integer | number, nanosecond: Integer | number, timeZoneOffsetSeconds: Integer | number) source

Params:

NameTypeAttributeDescription
hour Integer | number

the hour for the new local time.

minute Integer | number

the minute for the new local time.

second Integer | number

the second for the new local time.

nanosecond Integer | number

the nanosecond for the new local time.

timeZoneOffsetSeconds Integer | number

the time zone offset in seconds. Value represents the difference, in seconds, from UTC to local time. This is different from standard JavaScript Date.getTimezoneOffset() which is the difference, in minutes, from local time to UTC.

Public Members

public hour: * source

public minute: * source

public nanosecond: * source

public second: * source

public timeZoneOffsetSeconds: * source

Public Methods

public toString(): * source

Return:

*