Class (GI Struct)

Gst-1.0GstDateTime

Struct to store date, time and timezone information altogether. Gst.DateTime is refcounted and immutable.

Date information is handled using the proleptic Gregorian calendar.

Provides basic creation functions and accessor functions to its fields.

Index

Constructors

Properties

$gtype: GType<Gst.DateTime>

Methods

  • Retrieves the hour of the day represented by datetime in the gregorian calendar. The return is in the range of 0 to 23.

    Returns number

    the hour of the day, or -1 if none is set.

  • Retrieves the fractional part of the seconds in microseconds represented by datetime in the gregorian calendar.

    Returns number

    the microsecond of the second, or -1 if none is set.

  • Retrieves the minute of the hour represented by datetime in the gregorian calendar.

    Returns number

    the minute of the hour, or -1 if none is set.

  • Retrieves the second of the minute represented by datetime in the gregorian calendar.

    Returns number

    the second represented by datetime, or -1 if none is set.

  • Retrieves the offset from UTC in hours that the timezone specified by datetime represents. Timezones ahead (to the east) of UTC have positive values, timezones before (to the west) of UTC have negative values. If datetime represents UTC time, then the offset is zero.

    Returns number

    the offset from UTC in hours, or G_MAXFLOAT if none is set.

  • Returns boolean

    true if datetime's hour and minute fields are set, otherwise false

  • Returns boolean

    true if datetime's year field is set (which should always be the case), otherwise false

  • Create a minimal string compatible with ISO-8601. Possible output formats are (for example): 2012, 2012-06, 2012-06-23, 2012-06-23T23:30Z, 2012-06-23T23:30+0100, 2012-06-23T23:30:59Z, 2012-06-23T23:30:59+0100

    Returns string

    a newly allocated string formatted according to ISO 8601 and only including the datetime fields that are valid, or null in case there was an error.

  • Atomically decrements the reference count of datetime by one. When the reference count reaches zero, the structure is freed.

    Returns void

  • Parameters

    • tzoffset: number
    • year: number
    • month: number
    • day: number
    • hour: number
    • minute: number
    • seconds: number

    Returns Gst.DateTime

  • Parameters

    • year: number
    • month: number
    • day: number
    • hour: number
    • minute: number
    • seconds: number

    Returns Gst.DateTime