Home Reference Source
import {DateTime} from 'neo4j-driver/lib/v1/temporal-types.js'
public class | source

DateTime

Represents an instant capturing the date, the time and the timezone identifier. Created DateTime 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): DateTime

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

Constructor Summary

Public Constructor
public

constructor(year: Integer | number, month: Integer | number, day: Integer | number, hour: Integer | number, minute: Integer | number, second: Integer | number, nanosecond: Integer | number, timeZoneOffsetSeconds: Integer | number, timeZoneId: string | null)

Member Summary

Public Members
public

day: *

public

hour: *

public

minute: *

public

month: *

public
public

second: *

public
public
public

year: *

Method Summary

Public Methods
public

toString(): *

Static Public Methods

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

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

Params:

NameTypeAttributeDescription
standardDate global.Date

the standard JavaScript date to convert.

nanosecond Integer | number | undefined

the optional amount of nanoseconds.

Return:

DateTime

new date-time.

Public Constructors

public constructor(year: Integer | number, month: Integer | number, day: Integer | number, hour: Integer | number, minute: Integer | number, second: Integer | number, nanosecond: Integer | number, timeZoneOffsetSeconds: Integer | number, timeZoneId: string | null) source

Params:

NameTypeAttributeDescription
year Integer | number

the year for the new date-time.

month Integer | number

the month for the new date-time.

day Integer | number

the day for the new date-time.

hour Integer | number

the hour for the new date-time.

minute Integer | number

the minute for the new date-time.

second Integer | number

the second for the new date-time.

nanosecond Integer | number

the nanosecond for the new date-time.

timeZoneOffsetSeconds Integer | number

the time zone offset in seconds. Either this argument or timeZoneId should be defined. 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.

timeZoneId string | null

the time zone id for the new date-time. Either this argument or timeZoneOffsetSeconds should be defined.

Public Members

public day: * source

public hour: * source

public minute: * source

public month: * source

public nanosecond: * source

public second: * source

public timeZoneId: * source

public timeZoneOffsetSeconds: * source

public year: * source

Public Methods

public toString(): * source

Return:

*