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

LocalDateTime

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

Static Method Summary

Static Public Methods
public static

fromStandardDate(standardDate: global.Date, nanosecond: NumberOrInteger | undefined): LocalDateTime

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

Constructor Summary

Public Constructor
public

constructor(year: NumberOrInteger, month: NumberOrInteger, day: NumberOrInteger, hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: NumberOrInteger)

Member Summary

Public Members
public

day: NumberOrInteger

The day.

public

hour: NumberOrInteger

The hour.

public

minute: NumberOrInteger

The minute.

public

month: NumberOrInteger

The month.

public

nanosecond: NumberOrInteger

The nanosecond.

public

second: NumberOrInteger

The second.

public

year: NumberOrInteger

The year.

Method Summary

Public Methods
public

toStandardDate(): StandardDate

Convert date to standard JavaScript Date.

Static Public Methods

public static fromStandardDate(standardDate: global.Date, nanosecond: NumberOrInteger | undefined): LocalDateTime source

Create a LocalDateTime object from the given standard JavaScript Date and optional nanoseconds. Time zone offset component of the given date is ignored.

Params:

NameTypeAttributeDescription
standardDate global.Date

The standard JavaScript date to convert.

nanosecond NumberOrInteger | undefined

The optional amount of nanoseconds.

Return:

LocalDateTime

New LocalDateTime.

Public Constructors

public constructor(year: NumberOrInteger, month: NumberOrInteger, day: NumberOrInteger, hour: NumberOrInteger, minute: NumberOrInteger, second: NumberOrInteger, nanosecond: NumberOrInteger) source

Params:

NameTypeAttributeDescription
year NumberOrInteger

The year for the new local date.

month NumberOrInteger

The month for the new local date.

day NumberOrInteger

The day for the new local date.

hour NumberOrInteger

The hour for the new local time.

minute NumberOrInteger

The minute for the new local time.

second NumberOrInteger

The second for the new local time.

nanosecond NumberOrInteger

The nanosecond for the new local time.

Public Members

public day: NumberOrInteger source

The day.

public hour: NumberOrInteger source

The hour.

public minute: NumberOrInteger source

The minute.

public month: NumberOrInteger source

The month.

public nanosecond: NumberOrInteger source

The nanosecond.

public second: NumberOrInteger source

The second.

public year: NumberOrInteger source

The year.

Public Methods

public toStandardDate(): StandardDate source

Convert date to standard JavaScript Date.

Return:

StandardDate

Standard JavaScript Date at the local timezone