XMP_DateTime Struct Reference

The expanded type for a date and time. More...

#include <XMP_Const.h>

List of all members.

Public Attributes

XMP_Int32 year
 The year, can be negative.
XMP_Int32 month
 The month in the range 1..12.
XMP_Int32 day
 The day of the month in the range 1..31.
XMP_Int32 hour
 The hour in the range 0..23.
XMP_Int32 minute
 The minute in the range 0..59.
XMP_Int32 second
 The second in the range 0..59.
XMP_Bool hasDate
 Is the date portion meaningful?
XMP_Bool hasTime
 Is the time portion meaningful?
XMP_Bool hasTimeZone
 Is the time zone meaningful?
XMP_Int8 tzSign
XMP_Int32 tzHour
 The time zone hour in the range 0..23.
XMP_Int32 tzMinute
 The time zone minute in the range 0..59.
XMP_Int32 nanoSecond
 Nanoseconds within a second, often left as zero.

Detailed Description

The expanded type for a date and time.

Dates and time in the serialized XMP are ISO 8601 strings. The XMP_DateTime struct allows easy conversion with other formats.

All of the fields are 32 bit, even though most could be 8 bit. This avoids overflow when doing carries for arithmetic or normalization. All fields have signed values for the same reasons.

Date-time values are occasionally used with only a date or only a time component. A date without a time has zeros in the XMP_DateTime struct for all time fields. A time without a date has zeros for all date fields (year, month, and day).

TXMPUtils provides utility functions for manipulating date-time values.

See also:
TXMPUtils::ConvertToDate(), TXMPUtils::ConvertFromDate(), TXMPUtils::CompareDateTime(), TXMPUtils::ConvertToLocalTime(), TXMPUtils::ConvertToUTCTime(), TXMPUtils::CurrentDateTime(), TXMPUtils::SetTimeZone()

Member Data Documentation

The "sign" of the time zone, kXMP_TimeIsUTC (0) means UTC, kXMP_TimeWestOfUTC (-1) is west, kXMP_TimeEastOfUTC (+1) is east.


The documentation for this struct was generated from the following file:

XMP-Toolkit-SDK-CC201306 documentation generated by doxygen 1.6.3