ASN1C C/C++ Common Runtime  ASN1C v7.5.x
rtxDateTime.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2021 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
29 #ifndef _RTXDATETIME_H_
30 #define _RTXDATETIME_H_
31 
32 #include <time.h>
33 #include "rtxsrc/rtxContext.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
63 EXTERNRT int rtxDateToString
64  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
65 
81 EXTERNRT int rtxTimeToString
82  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
83 
99 EXTERNRT int rtxDateTimeToString
100  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
101 
116 EXTERNRT int rtxGYearToString
117  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
118 
134 EXTERNRT int rtxGYearMonthToString
135  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
136 
151 EXTERNRT int rtxGMonthToString
152  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
153 
169 EXTERNRT int rtxGMonthDayToString
170  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
171 
186 EXTERNRT int rtxGDayToString
187  (const OSNumDateTime* pvalue, OSUTF8CHAR* buffer, size_t bufsize);
188 
198 EXTERNRT int rtxGetCurrDateTime (OSNumDateTime* pvalue);
199 
214 EXTERNRT int rtxGetCurrDateTimeString
215  (char* buffer, OSSIZE bufsize, OSBOOL local);
216 
228 EXTERNRT int rtxCmpDate
229  (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
230 
246 EXTERNRT int rtxCmpDate2
247  (const OSNumDateTime* pvalue,
248  OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo);
249 
261 EXTERNRT int rtxCmpTime
262  (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
263 
279 EXTERNRT int rtxCmpTime2
280  (const OSNumDateTime* pvalue,
281  OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
282 
294 EXTERNRT int rtxCmpDateTime
295  (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
296 
315 EXTERNRT int rtxCmpDateTime2
316  (const OSNumDateTime* pvalue,
317  OSINT32 year, OSUINT8 mon, OSUINT8 day,
318  OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
319 
344 EXTERNRT int rtxParseDateString
345 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
346 
382 EXTERNRT int rtxParseTimeString
383 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
384 
385 
401 EXTERNRT int rtxParseDateTimeString
402  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
403 
419 EXTERNRT int rtxParseGYearString
420  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
421 
438 EXTERNRT int rtxParseGYearMonthString
439  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
440 
457 EXTERNRT int rtxParseGMonthString
458  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
459 
476 EXTERNRT int rtxParseGMonthDayString
477  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
478 
495 EXTERNRT int rtxParseGDayString
496  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
497 
509 EXTERNRT int rtxMSecsToDuration
510 (OSINT32 msecs, OSUTF8CHAR* buf, OSUINT32 bufsize);
511 
526 EXTERNRT int rtxDurationToMSecs
527 (OSUTF8CHAR* buf, OSUINT32 bufsize, OSINT32* msecs);
528 
540 EXTERNRT int rtxSetDateTime (OSNumDateTime* pvalue, struct tm* timeStruct);
541 
552 EXTERNRT int rtxGetGMTime (struct tm* pvalue, time_t timeMs);
553 
564 EXTERNRT int rtxGetLocalTime (struct tm* pvalue, time_t timeMs);
565 
577 EXTERNRT int rtxSetLocalDateTime (OSNumDateTime* pvalue, time_t timeMs);
578 
593 EXTERNRT int rtxSetUtcDateTime (OSNumDateTime* pvalue, time_t timeMs);
594 
606 EXTERNRT int rtxGetDateTime (const OSNumDateTime* pvalue, time_t* timeMs);
607 
615 EXTERNRT OSBOOL rtxDateIsValid (const OSNumDateTime* pvalue);
616 
624 EXTERNRT OSBOOL rtxTimeIsValid (const OSNumDateTime* pvalue);
625 
633 EXTERNRT OSBOOL rtxDateTimeIsValid (const OSNumDateTime* pvalue);
634 
645 EXTERNRT int rtxAscTime(char* buffer, OSSIZE bufsize, struct tm* pvalue);
646 
651 #ifdef __cplusplus
652 }
653 #endif
654 
655 #endif
int rtxGetDateTime(const OSNumDateTime *pvalue, time_t *timeMs)
int rtxParseGYearMonthString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxSetUtcDateTime(OSNumDateTime *pvalue, time_t timeMs)
int rtxParseDateTimeString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxAscTime(char *buffer, OSSIZE bufsize, struct tm *pvalue)
int rtxParseGMonthDayString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxGDayToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxTimeToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxMSecsToDuration(OSINT32 msecs, OSUTF8CHAR *buf, OSUINT32 bufsize)
int rtxParseDateString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxGetLocalTime(struct tm *pvalue, time_t timeMs)
int rtxCmpTime(const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
int rtxGMonthToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxParseTimeString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxSetDateTime(OSNumDateTime *pvalue, struct tm *timeStruct)
int rtxCmpDate(const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
int rtxDateTimeToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxGYearMonthToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
OSBOOL rtxDateTimeIsValid(const OSNumDateTime *pvalue)
OSBOOL rtxTimeIsValid(const OSNumDateTime *pvalue)
int rtxGetCurrDateTime(OSNumDateTime *pvalue)
int rtxDurationToMSecs(OSUTF8CHAR *buf, OSUINT32 bufsize, OSINT32 *msecs)
int rtxParseGMonthString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxDateToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxGetGMTime(struct tm *pvalue, time_t timeMs)
int rtxSetLocalDateTime(OSNumDateTime *pvalue, time_t timeMs)
int rtxParseGDayString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxParseGYearString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
int rtxGYearToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxGetCurrDateTimeString(char *buffer, OSSIZE bufsize, OSBOOL local)
int rtxCmpTime2(const OSNumDateTime *pvalue, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo)
int rtxGMonthDayToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
int rtxCmpDate2(const OSNumDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo)
int rtxCmpDateTime2(const OSNumDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo)
int rtxCmpDateTime(const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
OSBOOL rtxDateIsValid(const OSNumDateTime *pvalue)