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

Duration

Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds). Created Duration objects are frozen with Object.freeze() in constructor and thus immutable.

Constructor Summary

Public Constructor
public

constructor(months: Integer | number, days: Integer | number, seconds: Integer | number, nanoseconds: Integer | number)

Member Summary

Public Members
public

days: Integer | number

The number of days.

public

months: Integer | number

The number of months.

public

nanoseconds: Integer | number

The number of nanoseconds.

public

seconds: Integer | number

The number of seconds.

Public Constructors

public constructor(months: Integer | number, days: Integer | number, seconds: Integer | number, nanoseconds: Integer | number) source

Params:

NameTypeAttributeDescription
months Integer | number

The number of months for the new duration.

days Integer | number

The number of days for the new duration.

seconds Integer | number

The number of seconds for the new duration.

nanoseconds Integer | number

The number of nanoseconds for the new duration.

Public Members

public days: Integer | number source

The number of days.

public months: Integer | number source

The number of months.

public nanoseconds: Integer | number source

The number of nanoseconds.

public seconds: Integer | number source

The number of seconds.