Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

iso8601_time Struct Reference
[ISO 8601:2000 Time]

#include <iso8601.h>


Detailed Description

Structure representing a broken down ISO 8601:2000 time and date.

This structure holds the broken down components of an ISO 8601:2000 time and date representation. The structure supports calendar dates, week dates, and ordinal dates.


Data Fields

int it_year
 The calendar year.
int it_month
 The month.
int it_mday
 The day of the month.
int it_week
 The calendar week.
int it_wday
 The day of the week.
int it_yday
 The day of the year.
int it_hour
 The hour of the day.
int it_min
 The minute of the hour.
int it_sec
 The second of the minute.
int it_msec
 The millisecond of the second.
int it_tz
 The timezone represented as an offset of hours relative to UTC.
int it_tzmin
 An additional timezone offset specified in minutes east of the zero meridian.

Related Functions

(Note that these are not member functions.)

void iso8601_time_init (struct iso8601_time *iso8601_time, bool all_implied)
 Initialize a struct iso8601_time instance.
size_t iso8601_time_encode (const struct iso8601_time *iso8601_time, bool extended, char *buffer, ptrdiff_t buffer_length)
 Encode a time and date as a combined ISO 8601 date and time of day.
int iso8601_time_decode (struct iso8601_time *iso8601_time, const char *buffer)
 Decode an ISO 8601 encoded date and time of day.
int iso8601_time_to_epoch (const struct iso8601_time *iso8601_time, long long *epoch_time)
 Encode a date and time as an epoch representation.
int iso8601_time_from_epoch (struct iso8601_time *iso8601_time, long long epoch_time, int variant)
 Decode a date in epoch representation.
int iso8601_time_to_timespec (const struct iso8601_time *iso8601_time, struct timespec *ts)
 Encode a date and time as an instance of struct timespec.
int iso8601_time_from_timespec (struct iso8601_time *iso8601_time, const struct timespec *ts, int variant)
 Decode a date and time from an instance of struct timespec.
int iso8601_time_to_timeval (const struct iso8601_time *iso8601_time, struct timeval *tv)
 Encode a date and time as an instance of struct timeval.
int iso8601_time_from_timeval (struct iso8601_time *iso8601_time, const struct timeval *tv, int variant)
 Decode a date and time from an instance of struct timeval.
int iso8601_time_to_time_t (const struct iso8601_time *iso8601_time, time_t *t)
 Encode a date and time as a time_t value.
int iso8601_time_from_time_t (struct iso8601_time *iso8601_time, const time_t *t, int variant)
 Decode a date and time from a time_t value.
sobjiso8601_time_to_sobj (const struct iso8601_time *iso8601_time, bool epoch)
 Encode a date and time as a simple object instance.
int iso8601_time_from_sobj (struct iso8601_time *iso8601_time, struct sobj *sobj, int variant, bool cn_required)
 Decode a date and time from a simple object instance.
int iso8601_time_now (struct iso8601_time *iso8601_time, int variant)
 Initialize a time object with the current date and time.
void iso8601_time_set_timezone (struct iso8601_time *iso8601_time)
 Set the timezone of the specified time object to the local timezone.
void iso8601_time_print (const struct iso8601_time *iso8601_time, void *out)
 Print out an ISO 8601 time object to the specified stream.
void iso8601_time_dump (const struct iso8601_time *iso8601_time, void *out)
 Dump an ISO 8601 time object to the specified stream.


Field Documentation

int iso8601_time::it_hour
 

The hour of the day.

This is a value in the range [0..24] (midnigtht may represented as 00:00:00 of the day or 24:00:00 of the previous day).

int iso8601_time::it_mday
 

The day of the month.

This is either 0 (for undefined), 32 (for implied), or a value in the range [1..31].

int iso8601_time::it_min
 

The minute of the hour.

This is a value in the range [0..59].

int iso8601_time::it_month
 

The month.

This is either 0 (for undefined), 13 (for implied), or a value in the range [1..12].

int iso8601_time::it_msec
 

The millisecond of the second.

This is a value in the range [0..999].

int iso8601_time::it_sec
 

The second of the minute.

This is a value in the range [0..99] (the values [60..99] are used for leap seconds).

int iso8601_time::it_tz
 

The timezone represented as an offset of hours relative to UTC.

The offset is specified as hours east of the zero meridian, so CET is +1. The special value -24 represents local time. Other values are in the range [-23..23].

int iso8601_time::it_tzmin
 

An additional timezone offset specified in minutes east of the zero meridian.

This is a value in the range [0..59].

int iso8601_time::it_wday
 

The day of the week.

The is either 0 (for undefined), 8 (for implied), or a value in the range [1..7]. Day 1 is Monday.

int iso8601_time::it_week
 

The calendar week.

The first week of the year is the week of the 4th of January, this is week 1. The value is either 0 (for undefined), or 54 (for implied), or a value in the range [1..53].

int iso8601_time::it_yday
 

The day of the year.

The 1st of January is day 1. The value is either 0 (for undefined), 367 (for implied) or in the range [1..366].

int iso8601_time::it_year
 

The calendar year.

This is either 0 (for undefined), -1 (for implied) or a positive integer.


The documentation for this struct was generated from the following files:
Generated on Sat Jul 23 16:06:13 2005 for sobject by  doxygen 1.3.9.1