Home > Support > Documentation

rtxDateTime.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003-2007 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
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 EXTERNRTX int rtxDateToString 
00064    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00065 
00081 EXTERNRTX int rtxTimeToString 
00082    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00083 
00099 EXTERNRTX int rtxDateTimeToString 
00100    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00101 
00116 EXTERNRTX int rtxGYearToString 
00117    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00118 
00134 EXTERNRTX int rtxGYearMonthToString 
00135    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00136 
00151 EXTERNRTX int rtxGMonthToString 
00152    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00153 
00169 EXTERNRTX int rtxGMonthDayToString 
00170    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00171 
00186 EXTERNRTX int rtxGDayToString 
00187    (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
00188 
00198 EXTERNRTX int rtxGetCurrDateTime (OSNumDateTime* pvalue);
00199 
00211 EXTERNRTX int rtxCmpDate 
00212    (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
00213 
00229 EXTERNRTX int rtxCmpDate2 
00230    (const OSNumDateTime* pvalue,  
00231     OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo);
00232 
00244 EXTERNRTX int rtxCmpTime 
00245    (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
00246 
00262 EXTERNRTX int rtxCmpTime2 
00263    (const OSNumDateTime* pvalue,  
00264     OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
00265 
00277 EXTERNRTX int rtxCmpDateTime 
00278    (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
00279 
00298 EXTERNRTX 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 EXTERNRTX int rtxParseDateString
00328 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00329 
00365 EXTERNRTX int rtxParseTimeString
00366 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00367 
00368 
00384 EXTERNRTX int rtxParseDateTimeString
00385    (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00386 
00402 EXTERNRTX int rtxParseGYearString
00403    (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00404 
00421 EXTERNRTX int rtxParseGYearMonthString
00422    (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00423 
00440 EXTERNRTX int rtxParseGMonthString
00441    (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00442 
00459 EXTERNRTX int rtxParseGMonthDayString
00460    (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00461 
00478 EXTERNRTX int rtxParseGDayString
00479    (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
00480 
00492 EXTERNRTX int rtxMSecsToDuration
00493 (OSINT32 msecs, OSUTF8CHAR* buf, OSUINT32 bufsize);
00494 
00509 EXTERNRTX int rtxDurationToMSecs 
00510 (OSUTF8CHAR* buf, OSUINT32 bufsize, OSINT32* msecs);
00511 
00523 EXTERNRTX int rtxSetDateTime (OSNumDateTime* pvalue, struct tm* timeStruct);
00524 
00536 EXTERNRTX int rtxSetLocalDateTime (OSNumDateTime* pvalue, time_t timeMs);
00537 
00552 EXTERNRTX int rtxSetUtcDateTime (OSNumDateTime* pvalue, time_t timeMs);
00553 
00565 EXTERNRTX int rtxGetDateTime (const OSNumDateTime* pvalue, time_t* timeMs);
00566 
00574 EXTERNRTX OSBOOL rtxDateTimeIsValid (const OSNumDateTime* pvalue);
00575 
00580 #ifdef __cplusplus
00581 }
00582 #endif
00583 
00584 #endif