Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExifDateTime

Encodes an ExifDateTime with an optional tz offset in minutes.

Hierarchy

  • ExifDateTime

Index

Constructors

constructor

  • 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

Readonly day

day: number

Readonly hour

hour: number

Optional Readonly millisecond

millisecond: number

Readonly minute

minute: number

Readonly month

month: number

Optional Readonly rawValue

rawValue: string

Readonly second

second: number

Optional Readonly tzoffsetMinutes

tzoffsetMinutes: number

Readonly year

year: number

Optional Readonly zoneName

zoneName: string

Accessors

hasZone

  • get hasZone(): boolean

isValid

  • get isValid(): boolean

millis

  • get millis(): undefined | number

zone

  • get zone(): Maybe<string>

Methods

toDate

  • toDate(): Date

toDateTime

  • toDateTime(): DateTime

toExifString

  • toExifString(): string

toISOString

  • toISOString(options?: ToISOTimeOptions): Maybe<string>

toString

  • toString(): Maybe<string>

Static fromDateTime

  • fromDateTime(dt: DateTime, rawValue?: string): Maybe<ExifDateTime>

Static fromEXIF

  • 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>

Static fromExifLoose

  • fromExifLoose(text: Maybe<string>, defaultZone?: Maybe<string>): Maybe<ExifDateTime>

Static fromExifStrict

  • fromExifStrict(text: Maybe<string>, zone?: Maybe<string>): Maybe<ExifDateTime>

Static fromISO

  • fromISO(iso: string, zone?: Maybe<string>, rawValue?: string): Maybe<ExifDateTime>

Generated using TypeDoc