Options
All
  • Public
  • Public/Protected
  • All
Menu

Encodes an ExifDateTime with an optional tz offset in minutes.

Hierarchy

  • ExifDateTime

Index

Constructors

  • new ExifDateTime(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond?: number, tzoffsetMinutes?: number, rawValue?: string, zoneName?: string): ExifDateTime
  • Parameters

    • year: number
    • month: number
    • day: number
    • hour: number
    • minute: number
    • second: number
    • Optional millisecond: number
    • Optional tzoffsetMinutes: number
    • Optional rawValue: string
    • Optional zoneName: string

    Returns ExifDateTime

Properties

day: number
hour: number
millisecond?: number
minute: number
month: number
rawValue?: string
second: number
tzoffsetMinutes?: number
year: number
zoneName?: string

Accessors

  • get hasZone(): boolean
  • get isValid(): boolean
  • get millis(): undefined | number
  • get zone(): Maybe<string>

Methods

  • toDate(): Date
  • toDateTime(): DateTime
  • toExifString(): string
  • toISOString(options?: ToISOTimeOptions): Maybe<string>
  • toJSON(): { _ctor: string; day: number; hour: number; millisecond: undefined | number; minute: number; month: number; rawValue: undefined | string; second: number; tzoffsetMinutes: undefined | number; year: number; zoneName: undefined | string }
  • Returns { _ctor: string; day: number; hour: number; millisecond: undefined | number; minute: number; month: number; rawValue: undefined | string; second: number; tzoffsetMinutes: undefined | number; year: number; zoneName: undefined | string }

    • _ctor: string
    • day: number
    • hour: number
    • millisecond: undefined | number
    • minute: number
    • month: number
    • rawValue: undefined | string
    • second: number
    • tzoffsetMinutes: undefined | number
    • year: number
    • zoneName: undefined | string
  • toString(): Maybe<string>
  • fromDateTime(dt: DateTime, rawValue?: string): Maybe<ExifDateTime>
  • fromEXIF(text: string, defaultZone?: Maybe<string>): Maybe<ExifDateTime>
  • Try to parse a date-time string from EXIF. If there is not both a date and a time component, returns undefined.

    Parameters

    • text: string

      from EXIF metadata

    • Optional defaultZone: Maybe<string>

      a "zone name" which may be IANA, like "America/Los_Angeles", or an offset, like "UTC-3". See offsetMinutesToZoneName.

    Returns Maybe<ExifDateTime>

  • fromExifLoose(text: Maybe<string>, defaultZone?: Maybe<string>): Maybe<ExifDateTime>
  • fromExifStrict(text: Maybe<string>, zone?: Maybe<string>): Maybe<ExifDateTime>
  • fromISO(iso: string, zone?: Maybe<string>, rawValue?: string): Maybe<ExifDateTime>
  • fromJSON(json: { _ctor: string; day: number; hour: number; millisecond: undefined | number; minute: number; month: number; rawValue: undefined | string; second: number; tzoffsetMinutes: undefined | number; year: number; zoneName: undefined | string }): ExifDateTime
  • Parameters

    • json: { _ctor: string; day: number; hour: number; millisecond: undefined | number; minute: number; month: number; rawValue: undefined | string; second: number; tzoffsetMinutes: undefined | number; year: number; zoneName: undefined | string }
      • _ctor: string
      • day: number
      • hour: number
      • millisecond: undefined | number
      • minute: number
      • month: number
      • rawValue: undefined | string
      • second: number
      • tzoffsetMinutes: undefined | number
      • year: number
      • zoneName: undefined | string

    Returns ExifDateTime

Generated using TypeDoc