XMP Toolkit SDK  6.0.0
XMP_DateTime Struct Reference

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

#include <XMP_Const.h>

Public Attributes

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

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()

Definition at line 232 of file XMP_Const.h.

Member Data Documentation

◆ day

XMP_Int32 XMP_DateTime::day

The day of the month in the range 1..31.

Definition at line 241 of file XMP_Const.h.

◆ hasDate

XMP_Bool XMP_DateTime::hasDate

Is the date portion meaningful?

Definition at line 253 of file XMP_Const.h.

◆ hasTime

XMP_Bool XMP_DateTime::hasTime

Is the time portion meaningful?

Definition at line 256 of file XMP_Const.h.

◆ hasTimeZone

XMP_Bool XMP_DateTime::hasTimeZone

Is the time zone meaningful?

Definition at line 259 of file XMP_Const.h.

◆ hour

XMP_Int32 XMP_DateTime::hour

The hour in the range 0..23.

Definition at line 244 of file XMP_Const.h.

◆ minute

XMP_Int32 XMP_DateTime::minute

The minute in the range 0..59.

Definition at line 247 of file XMP_Const.h.

◆ month

XMP_Int32 XMP_DateTime::month

The month in the range 1..12.

Definition at line 238 of file XMP_Const.h.

◆ nanoSecond

XMP_Int32 XMP_DateTime::nanoSecond

Nanoseconds within a second, often left as zero.

Definition at line 272 of file XMP_Const.h.

◆ second

XMP_Int32 XMP_DateTime::second

The second in the range 0..59.

Definition at line 250 of file XMP_Const.h.

◆ tzHour

XMP_Int32 XMP_DateTime::tzHour

The time zone hour in the range 0..23.

Definition at line 266 of file XMP_Const.h.

◆ tzMinute

XMP_Int32 XMP_DateTime::tzMinute

The time zone minute in the range 0..59.

Definition at line 269 of file XMP_Const.h.

◆ tzSign

XMP_Int8 XMP_DateTime::tzSign

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

Definition at line 263 of file XMP_Const.h.

◆ year

XMP_Int32 XMP_DateTime::year

The year, can be negative.

Definition at line 235 of file XMP_Const.h.


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