00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00029 #ifndef _RTXDATETIME_H_
00030 #define _RTXDATETIME_H_
00031
00032 #include <time.h>
00033 #include "rtxsrc/rtxContext.h"
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00063 EXTERNRT int rtxDateToString
00064 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00065
00081 EXTERNRT int rtxTimeToString
00082 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00083
00099 EXTERNRT int rtxDateTimeToString
00100 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00101
00116 EXTERNRT int rtxGYearToString
00117 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00118
00134 EXTERNRT int rtxGYearMonthToString
00135 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00136
00151 EXTERNRT int rtxGMonthToString
00152 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00153
00169 EXTERNRT int rtxGMonthDayToString
00170 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00171
00186 EXTERNRT int rtxGDayToString
00187 (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00188
00198 EXTERNRT int rtxGetCurrDateTime (OSNumDateTime* pvalue);
00199
00211 EXTERNRT int rtxCmpDate
00212 (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
00213
00229 EXTERNRT int rtxCmpDate2
00230 (const OSNumDateTime* pvalue,
00231 OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo);
00232
00244 EXTERNRT int rtxCmpTime
00245 (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
00246
00262 EXTERNRT int rtxCmpTime2
00263 (const OSNumDateTime* pvalue,
00264 OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
00265
00277 EXTERNRT int rtxCmpDateTime
00278 (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
00279
00298 EXTERNRT int rtxCmpDateTime2
00299 (const OSNumDateTime* pvalue,
00300 OSINT32 year, OSUINT8 mon, OSUINT8 day,
00301 OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
00302
00327 EXTERNRT int rtxParseDateString
00328 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00329
00365 EXTERNRT int rtxParseTimeString
00366 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00367
00368
00384 EXTERNRT int rtxParseDateTimeString
00385 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00386
00402 EXTERNRT int rtxParseGYearString
00403 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00404
00421 EXTERNRT int rtxParseGYearMonthString
00422 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00423
00440 EXTERNRT int rtxParseGMonthString
00441 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00442
00459 EXTERNRT int rtxParseGMonthDayString
00460 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00461
00478 EXTERNRT int rtxParseGDayString
00479 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00480
00492 EXTERNRT int rtxMSecsToDuration
00493 (OSINT32 msecs, OSUTF8CHAR* buf, OSUINT32 bufsize);
00494
00509 EXTERNRT int rtxDurationToMSecs
00510 (OSUTF8CHAR* buf, OSUINT32 bufsize, OSINT32* msecs);
00511
00523 EXTERNRT int rtxSetDateTime (OSNumDateTime* pvalue, struct tm* timeStruct);
00524
00536 EXTERNRT int rtxSetLocalDateTime (OSNumDateTime* pvalue, time_t timeMs);
00537
00552 EXTERNRT int rtxSetUtcDateTime (OSNumDateTime* pvalue, time_t timeMs);
00553
00565 EXTERNRT int rtxGetDateTime (const OSNumDateTime* pvalue, time_t* timeMs);
00566
00574 EXTERNRT OSBOOL rtxDateIsValid (const OSNumDateTime* pvalue);
00575
00583 EXTERNRT OSBOOL rtxTimeIsValid (const OSNumDateTime* pvalue);
00584
00592 EXTERNRT OSBOOL rtxDateTimeIsValid (const OSNumDateTime* pvalue);
00593
00598 #ifdef __cplusplus
00599 }
00600 #endif
00601
00602 #endif