Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a timestamp[1] value in an Ion stream.

[1] http://amzn.github.io/ion-docs/docs/spec.html#timestamp

Hierarchy

  • newClass<DateConstructor, this> & Date
    • Timestamp

Implements

Index

Constructors

constructor

  • Constructor.

    Parameters

    • dateOrTimestamp: Date | Timestamp

      A Date or Timestamp to represent as a timestamp.

    • Default value annotations: string[] = []

      An optional array of strings to associate with this timestamp.

    Returns Timestamp

Properties

_ionAnnotations

_ionAnnotations: string[]

_ionType

_ionType: IonType

Static Date

Date: DateConstructor

Methods

[Symbol.toPrimitive]

  • [Symbol.toPrimitive](hint: "default"): string
  • [Symbol.toPrimitive](hint: "string"): string
  • [Symbol.toPrimitive](hint: "number"): number
  • [Symbol.toPrimitive](hint: string): string | number
  • Converts a Date object to a string.

    Parameters

    • hint: "default"

    Returns string

  • Converts a Date object to a string.

    Parameters

    • hint: "string"

    Returns string

  • Converts a Date object to a number.

    Parameters

    • hint: "number"

    Returns number

  • Converts a Date object to a string or number.

    throws

    {TypeError} If 'hint' was given something other than "number", "string", or "default".

    Parameters

    • hint: string

      The strings "number", "string", or "default" to specify what primitive to return.

    Returns string | number

    A number if 'hint' was "number", a string if 'hint' was "string" or "default".

_setAnnotations

  • _setAnnotations(annotations: string[]): void

_unsupportedOperation

  • _unsupportedOperation<T>(functionName: string): never

_valueEquals

  • _valueEquals(other: any, options?: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true; onlyCompareIon?: undefined | false | true }): boolean
  • Parameters

    • other: any
    • Default value options: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true; onlyCompareIon?: undefined | false | true } = {epsilon: null,ignoreAnnotations: false,ignoreTimestampPrecision: false,onlyCompareIon: true,}
      • Optional epsilon?: number | null
      • Optional ignoreAnnotations?: undefined | false | true
      • Optional ignoreTimestampPrecision?: undefined | false | true
      • Optional onlyCompareIon?: undefined | false | true

    Returns boolean

allFields

  • allFields(): [string, Value[]][]

as

bigIntValue

  • bigIntValue(): JSBI | null

booleanValue

  • booleanValue(): boolean | null

dateValue

decimalValue

deleteField

  • deleteField(name: string): boolean

elements

equals

  • equals(other: any, options?: { epsilon?: number | null }): boolean
  • Implementation of the dom.Value interface method equals()

    Parameters

    • other: any
    • Default value options: { epsilon?: number | null } = { epsilon: null }
      • Optional epsilon?: number | null

    Returns boolean

fieldNames

  • fieldNames(): string[]

fields

  • fields(): [string, Value][]

get

getAll

getAnnotations

  • getAnnotations(): string[]

getDate

  • getDate(): number
  • Gets the day-of-the-month, using local time.

    Returns number

getDay

  • getDay(): number
  • Gets the day of the week, using local time.

    Returns number

getFullYear

  • getFullYear(): number
  • Gets the year, using local time.

    Returns number

getHours

  • getHours(): number
  • Gets the hours in a date, using local time.

    Returns number

getMilliseconds

  • getMilliseconds(): number
  • Gets the milliseconds of a Date, using local time.

    Returns number

getMinutes

  • getMinutes(): number
  • Gets the minutes of a Date object, using local time.

    Returns number

getMonth

  • getMonth(): number
  • Gets the month, using local time.

    Returns number

getSeconds

  • getSeconds(): number
  • Gets the seconds of a Date object, using local time.

    Returns number

getTime

  • getTime(): number
  • Gets the time value in milliseconds.

    Returns number

getTimezoneOffset

  • getTimezoneOffset(): number
  • Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).

    Returns number

getType

getUTCDate

  • getUTCDate(): number
  • Gets the day-of-the-month, using Universal Coordinated Time (UTC).

    Returns number

getUTCDay

  • getUTCDay(): number
  • Gets the day of the week using Universal Coordinated Time (UTC).

    Returns number

getUTCFullYear

  • getUTCFullYear(): number
  • Gets the year using Universal Coordinated Time (UTC).

    Returns number

getUTCHours

  • getUTCHours(): number
  • Gets the hours value in a Date object using Universal Coordinated Time (UTC).

    Returns number

getUTCMilliseconds

  • getUTCMilliseconds(): number
  • Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).

    Returns number

getUTCMinutes

  • getUTCMinutes(): number
  • Gets the minutes of a Date object using Universal Coordinated Time (UTC).

    Returns number

getUTCMonth

  • getUTCMonth(): number
  • Gets the month of a Date object using Universal Coordinated Time (UTC).

    Returns number

getUTCSeconds

  • getUTCSeconds(): number
  • Gets the seconds of a Date object using Universal Coordinated Time (UTC).

    Returns number

ionEquals

  • ionEquals(other: Value, options?: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true }): boolean
  • Implementation of the dom.Value interface method ionEquals()

    Parameters

    • other: Value
    • Default value options: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true } = {epsilon: null,ignoreAnnotations: false,ignoreTimestampPrecision: false,}
      • Optional epsilon?: number | null
      • Optional ignoreAnnotations?: undefined | false | true
      • Optional ignoreTimestampPrecision?: undefined | false | true

    Returns boolean

isNull

  • isNull(): boolean

numberValue

  • numberValue(): number | null

setDate

  • setDate(date: number): number
  • Sets the numeric day-of-the-month value of the Date object using local time.

    Parameters

    • date: number

      A numeric value equal to the day of the month.

    Returns number

setFullYear

  • setFullYear(year: number, month?: undefined | number, date?: undefined | number): number
  • Sets the year of the Date object using local time.

    Parameters

    • year: number

      A numeric value for the year.

    • Optional month: undefined | number

      A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.

    • Optional date: undefined | number

      A numeric value equal for the day of the month.

    Returns number

setHours

  • setHours(hours: number, min?: undefined | number, sec?: undefined | number, ms?: undefined | number): number
  • Sets the hour value in the Date object using local time.

    Parameters

    • hours: number

      A numeric value equal to the hours value.

    • Optional min: undefined | number

      A numeric value equal to the minutes value.

    • Optional sec: undefined | number

      A numeric value equal to the seconds value.

    • Optional ms: undefined | number

      A numeric value equal to the milliseconds value.

    Returns number

setMilliseconds

  • setMilliseconds(ms: number): number
  • Sets the milliseconds value in the Date object using local time.

    Parameters

    • ms: number

      A numeric value equal to the millisecond value.

    Returns number

setMinutes

  • setMinutes(min: number, sec?: undefined | number, ms?: undefined | number): number
  • Sets the minutes value in the Date object using local time.

    Parameters

    • min: number

      A numeric value equal to the minutes value.

    • Optional sec: undefined | number

      A numeric value equal to the seconds value.

    • Optional ms: undefined | number

      A numeric value equal to the milliseconds value.

    Returns number

setMonth

  • setMonth(month: number, date?: undefined | number): number
  • Sets the month value in the Date object using local time.

    Parameters

    • month: number

      A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

    • Optional date: undefined | number

      A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.

    Returns number

setSeconds

  • setSeconds(sec: number, ms?: undefined | number): number
  • Sets the seconds value in the Date object using local time.

    Parameters

    • sec: number

      A numeric value equal to the seconds value.

    • Optional ms: undefined | number

      A numeric value equal to the milliseconds value.

    Returns number

setTime

  • setTime(time: number): number
  • Sets the date and time value in the Date object.

    Parameters

    • time: number

      A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.

    Returns number

setUTCDate

  • setUTCDate(date: number): number
  • Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • date: number

      A numeric value equal to the day of the month.

    Returns number

setUTCFullYear

  • setUTCFullYear(year: number, month?: undefined | number, date?: undefined | number): number
  • Sets the year value in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • year: number

      A numeric value equal to the year.

    • Optional month: undefined | number

      A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.

    • Optional date: undefined | number

      A numeric value equal to the day of the month.

    Returns number

setUTCHours

  • setUTCHours(hours: number, min?: undefined | number, sec?: undefined | number, ms?: undefined | number): number
  • Sets the hours value in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • hours: number

      A numeric value equal to the hours value.

    • Optional min: undefined | number

      A numeric value equal to the minutes value.

    • Optional sec: undefined | number

      A numeric value equal to the seconds value.

    • Optional ms: undefined | number

      A numeric value equal to the milliseconds value.

    Returns number

setUTCMilliseconds

  • setUTCMilliseconds(ms: number): number
  • Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • ms: number

      A numeric value equal to the millisecond value.

    Returns number

setUTCMinutes

  • setUTCMinutes(min: number, sec?: undefined | number, ms?: undefined | number): number
  • Sets the minutes value in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • min: number

      A numeric value equal to the minutes value.

    • Optional sec: undefined | number

      A numeric value equal to the seconds value.

    • Optional ms: undefined | number

      A numeric value equal to the milliseconds value.

    Returns number

setUTCMonth

  • setUTCMonth(month: number, date?: undefined | number): number
  • Sets the month value in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • month: number

      A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

    • Optional date: undefined | number

      A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.

    Returns number

setUTCSeconds

  • setUTCSeconds(sec: number, ms?: undefined | number): number
  • Sets the seconds value in the Date object using Universal Coordinated Time (UTC).

    Parameters

    • sec: number

      A numeric value equal to the seconds value.

    • Optional ms: undefined | number

      A numeric value equal to the milliseconds value.

    Returns number

stringValue

  • stringValue(): string | null

timestampValue

toDateString

  • toDateString(): string
  • Returns a date as a string value.

    Returns string

toISOString

  • toISOString(): string
  • Returns a date as a string value in ISO format.

    Returns string

toJSON

  • toJSON(key?: any): string
  • Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.

    Parameters

    • Optional key: any

    Returns string

toLocaleDateString

  • toLocaleDateString(): string

toLocaleString

  • toLocaleString(): string
  • Returns a value as a string value appropriate to the host environment's current locale.

    Returns string

toLocaleTimeString

  • toLocaleTimeString(): string

toString

  • toString(): string
  • Returns a string representation of a date. The format of the string depends on the locale.

    Returns string

toTimeString

  • toTimeString(): string
  • Returns a time as a string value.

    Returns string

toUTCString

  • toUTCString(): string
  • Returns a date converted to a string using Universal Coordinated Time (UTC).

    Returns string

uInt8ArrayValue

  • uInt8ArrayValue(): Uint8Array | null

valueOf

  • valueOf(): number
  • Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.

    Returns number

writeTo

  • writeTo(writer: Writer): void

Static _fromJsValue

  • _fromJsValue(jsValue: any, annotations: string[]): Value

Static _getIonType