1DATE_FROM_TM(3)              http://www.synce.org/             DATE_FROM_TM(3)
2
3
4

NAME

6       date_from_tm - convert between tm struct and Windows DATE value
7

SYNOPSIS

9       #include <synce.h>
10
11       bool date_from_tm(struct tm *pTm, DATE *pDateOut);
12
13       bool date_to_tm(DATE dateIn, DWORD dwFlags, struct tm *pTm);
14

DESCRIPTION

16       The  date_from_tm() function converts a tm struct into the Windows DATE
17       field pointed to by pDateOut.  Only years after 1900 are converted. The
18       fields tm.tm_wday, tm.tm_yday and tm.tm_isdst are not used.
19
20       date_to_tm() does the reverse. It only fills the fields tm_sec, tm_min,
21       tm_hour, tm_year, tm_day, tm_mon. Dates before January 1st 1900 are not
22       supported.   dwFlags  should  be 0, DATE_TIMEVALUEONLY to omit the date
23       information or DATE_DATEVALUEONLY to omit time information. Whereas the
24       tm.tm_year  field  usually  holds  the number of years since 1900, this
25       function provides the complete year.
26

RETURN VALUE

28       Both functions return FALSE on encountering an invalid  value  or  year
29       earlier than 1900, or TRUE if successful.
30

SEE ALSO

32       synce(7)
33
34
35
36The SynCE Project                 2007-08-26                   DATE_FROM_TM(3)
Impressum