Encodes an ExifDateTime with an optional tz offset in minutes.

Constructors

  • Parameters

    • year: number
    • month: number
    • day: number
    • hour: number
    • minute: number
    • second: number
    • Optionalmillisecond: number
    • OptionaltzoffsetMinutes: number
    • OptionalrawValue: string
    • OptionalzoneName: string
    • OptionalinferredZone: boolean

    Returns ExifDateTime

Properties

day: number
hour: number
inferredZone?: boolean
millisecond?: number
minute: number
month: number
rawValue?: string
second: number
tzoffsetMinutes?: number
year: number
zone: Maybe<string>
zoneName?: string

Accessors

Methods

  • CAUTION: This instance will inherit the system timezone if this instance has an unset zone (as Luxon doesn't support "unset" timezones)

    Parameters

    • OptionaloverrideZone: Maybe<string>

    Returns DateTime<boolean>

  • Returns {
        _ctor: string;
        day: number;
        hour: number;
        inferredZone: undefined | boolean;
        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
    • inferredZone: undefined | boolean
    • millisecond: undefined | number
    • minute: number
    • month: number
    • rawValue: undefined | string
    • second: number
    • tzoffsetMinutes: undefined | number
    • year: number
    • zoneName: undefined | string
  • 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

    • OptionaldefaultZone: Maybe<string>

      a "zone name" to use as a backstop, or default, if text doesn't specify a zone. This may be IANA-formatted, like "America/Los_Angeles", or an offset, like "UTC-3". See offsetMinutesToZoneName.

    Returns Maybe<ExifDateTime>

  • Parse the given date-time string, EXIF-formatted.

    Parameters

    • text: Maybe<string>

      from EXIF metadata, in y:M:d H:m:s format (with optional sub-seconds and/or timezone)

    • OptionaldefaultZone: Maybe<string>

      a "zone name" to use as a backstop, or default, if text doesn't specify a zone. This may be IANA-formatted, like "America/Los_Angeles", or an offset, like "UTC-3". See offsetMinutesToZoneName.

    Returns Maybe<ExifDateTime>

  • Parameters

    • json: Omit<{
          _ctor: string;
          day: number;
          hour: number;
          inferredZone: undefined | boolean;
          millisecond: undefined | number;
          minute: number;
          month: number;
          rawValue: undefined | string;
          second: number;
          tzoffsetMinutes: undefined | number;
          year: number;
          zoneName: undefined | string;
      }, "_ctor">

    Returns ExifDateTime

    a new ExifDateTime from the given JSON. Note that this instance may not be valid.

  • Create an ExifDateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.

    Parameters

    • millis: number

      a number of milliseconds since 1970 UTC

    • options: DateTimeJSOptions & {
          rawValue?: string;
      } = {}

    Returns ExifDateTime