XBinder  Version 2.6.x
rtxDateTime.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2018 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 
211 EXTERNRT int rtxCmpDate
212  (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
213 
229 EXTERNRT int rtxCmpDate2
230  (const OSNumDateTime* pvalue,
231  OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo);
232 
244 EXTERNRT int rtxCmpTime
245  (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
246 
262 EXTERNRT int rtxCmpTime2
263  (const OSNumDateTime* pvalue,
264  OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
265 
277 EXTERNRT int rtxCmpDateTime
278  (const OSNumDateTime* pvalue1, const OSNumDateTime* pvalue2);
279 
298 EXTERNRT int rtxCmpDateTime2
299  (const OSNumDateTime* pvalue,
300  OSINT32 year, OSUINT8 mon, OSUINT8 day,
301  OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo);
302 
327 EXTERNRT int rtxParseDateString
328 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
329 
365 EXTERNRT int rtxParseTimeString
366 (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
367 
368 
384 EXTERNRT int rtxParseDateTimeString
385  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
386 
402 EXTERNRT int rtxParseGYearString
403  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
404 
421 EXTERNRT int rtxParseGYearMonthString
422  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
423 
440 EXTERNRT int rtxParseGMonthString
441  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
442 
459 EXTERNRT int rtxParseGMonthDayString
460  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
461 
478 EXTERNRT int rtxParseGDayString
479  (const OSUTF8CHAR* inpdata, size_t inpdatalen, OSNumDateTime* pvalue);
480 
492 EXTERNRT int rtxMSecsToDuration
493 (OSINT32 msecs, OSUTF8CHAR* buf, OSUINT32 bufsize);
494 
509 EXTERNRT int rtxDurationToMSecs
510 (OSUTF8CHAR* buf, OSUINT32 bufsize, OSINT32* msecs);
511 
523 EXTERNRT int rtxSetDateTime (OSNumDateTime* pvalue, struct tm* timeStruct);
524 
536 EXTERNRT int rtxSetLocalDateTime (OSNumDateTime* pvalue, time_t timeMs);
537 
552 EXTERNRT int rtxSetUtcDateTime (OSNumDateTime* pvalue, time_t timeMs);
553 
565 EXTERNRT int rtxGetDateTime (const OSNumDateTime* pvalue, time_t* timeMs);
566 
574 EXTERNRT OSBOOL rtxDateIsValid (const OSNumDateTime* pvalue);
575 
583 EXTERNRT OSBOOL rtxTimeIsValid (const OSNumDateTime* pvalue);
584 
592 EXTERNRT OSBOOL rtxDateTimeIsValid (const OSNumDateTime* pvalue);
593 
598 #ifdef __cplusplus
599 }
600 #endif
601 
602 #endif
EXTERNRT int rtxGMonthDayToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a gregorian month and day value to a string (MM-DD).
EXTERNRT OSBOOL rtxTimeIsValid(const OSNumDateTime *pvalue)
This function verifies that time members (hour, minute, second, timezone) of the OSNumDateTime struct...
EXTERNRT int rtxParseGMonthString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a gregorian month value from a supplied string and sets the month field in the ...
EXTERNRT int rtxGMonthToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a gregorian month value to a string (MM).
EXTERNRT int rtxSetUtcDateTime(OSNumDateTime *pvalue, time_t timeMs)
This function converts a UTC date and time value to an OSNumDateTime structure.
EXTERNRT int rtxCmpDateTime2(const OSNumDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo)
This function compares the OSNumDateTime structure and dateTime components, specified as parameters...
EXTERNRT int rtxMSecsToDuration(OSINT32 msecs, OSUTF8CHAR *buf, OSUINT32 bufsize)
This function converts millisecs to a duration string with format "PnYnMnDTnHnMnS".
EXTERNRT int rtxDateToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a numeric date value consisting of individual date components (year...
EXTERNRT int rtxCmpDateTime(const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
This function compares two OSNumDateTime structures and returns the result of the comparison...
EXTERNRT int rtxParseGYearString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a gregorian year value from a supplied string and sets the year in the given OS...
EXTERNRT int rtxParseDateString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a date value from a supplied string and sets the given OSNumDateTime argument t...
EXTERNRT int rtxSetDateTime(OSNumDateTime *pvalue, struct tm *timeStruct)
This function converts a structure of type &#39;struct tm&#39; to an OSNumDateTime structure.
EXTERNRT OSBOOL rtxDateIsValid(const OSNumDateTime *pvalue)
This function verifies that date members (year, month, day, timezone) of the OSNumDateTime structure ...
EXTERNRT int rtxDurationToMSecs(OSUTF8CHAR *buf, OSUINT32 bufsize, OSINT32 *msecs)
This function converts a duration string to milliseconds.
Common run-time context definitions.
EXTERNRT int rtxParseGMonthDayString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a gregorian month and day value from a supplied string and sets the month and d...
EXTERNRT int rtxCmpDate(const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
This function compares the date part of two OSNumDateTime structures and returns the result of the co...
EXTERNRT int rtxGYearToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a gregorian year value to a string (CCYY).
EXTERNRT int rtxCmpTime(const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
This function compares the time part of two OSNumDateTime structures and returns the result of the co...
EXTERNRT int rtxCmpTime2(const OSNumDateTime *pvalue, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo)
This function compares the time part of OSNumDateTime structure and time components, specified as parameters.
EXTERNRT int rtxParseDateTimeString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a datetime value from a supplied string and sets the given OSNumDateTime to the...
EXTERNRT int rtxDateTimeToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a numeric date/time value of all components in the OSNumDateTime structure into...
EXTERNRT int rtxParseGYearMonthString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a gregorian year and month value from a supplied string and sets the year and m...
EXTERNRT int rtxGYearMonthToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a gregorian year and month value to a string (CCYY-MM).
EXTERNRT int rtxGDayToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a gregorian day value to a string (DD).
EXTERNRT int rtxCmpDate2(const OSNumDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo)
This function compares the date part of OSNumDateTime structure and date components, specified as parameters.
EXTERNRT int rtxParseTimeString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a time value from a supplied string and sets the given OSNumDateTime structure ...
EXTERNRT int rtxSetLocalDateTime(OSNumDateTime *pvalue, time_t timeMs)
This function converts a local date and time value to an OSNumDateTime structure. ...
Numeric date/time structure.
Definition: osSysTypes.h:118
EXTERNRT int rtxParseGDayString(const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue)
This function decodes a gregorian day value from a supplied string and sets the day field in the give...
EXTERNRT OSBOOL rtxDateTimeIsValid(const OSNumDateTime *pvalue)
This function verifies that all members of the OSNumDateTime structure contains valid values...
EXTERNRT int rtxGetDateTime(const OSNumDateTime *pvalue, time_t *timeMs)
This function converts an OSNumDateTime structure to a calendar time encoded as a value of type time_...
EXTERNRT int rtxTimeToString(const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
This function formats a numeric time value consisting of individual time components (hour...
EXTERNRT int rtxGetCurrDateTime(OSNumDateTime *pvalue)
This function reads the system date and time and stores the value in the given OSNumDateTime structur...