Home > Support > Documentation

rtxDateTime.h File Reference

Common runtime functions for converting to and from various standard date/time formats. More...

#include <time.h>
#include "rtxsrc/rtxContext.h"

Go to the source code of this file.


Functions

int rtxDateToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a numeric date value consisting of individual date components (year, month, day) into XML schema standard format (CCYY-MM-DD).
int rtxTimeToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a numeric time value consisting of individual time components (hour, minute, second, fraction-of-second, time zone) into XML schema standard format (HH:MM:SS[.frac][TZ]).
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 XML schema standard format (CCYY-MM-DDTHH:MM:SS[.frac][TZ]).
int rtxGYearToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a gregorian year value to a string (CCYY).
int rtxGYearMonthToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a gregorian year and month value to a string (CCYY-MM).
int rtxGMonthToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a gregorian month value to a string (MM).
int rtxGMonthDayToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a gregorian month and day value to a string (MM-DD).
int rtxGDayToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize)
 This function formats a gregorian day value to a string (DD).
int rtxGetCurrDateTime (OSNumDateTime *pvalue)
 This function reads the system date and time and stores the value in the given OSNumDateTime structure variable.
int rtxCmpDate (const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
 This function compares the date part of two OSNumDateTime structures and returns the result of the comparison.
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.
int rtxCmpTime (const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
 This function compares the time part of two OSNumDateTime structures and returns the result of the comparison.
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.
int rtxCmpDateTime (const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2)
 This function compares two OSNumDateTime structures and returns the result of the comparison.
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.
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 to the decoded date value.
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 to the decoded time value.
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 decoded date and time value.
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 OSNumDateTime to the decoded value.
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 month fields in the given OSNumDateTime to the decoded values.
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 given OSNumDateTime to the decoded value.
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 day fields in the given OSNumDateTime to the decoded values.
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 given OSNumDateTime to the decoded value.
int rtxMSecsToDuration (OSINT32 msecs, OSUTF8CHAR *buf, OSUINT32 bufsize)
 This function converts millisecs to a duration string with format "PnYnMnDTnHnMnS".
int rtxDurationToMSecs (OSUTF8CHAR *buf, OSUINT32 bufsize, OSINT32 *msecs)
 This function converts a duration string to milliseconds.
int rtxSetDateTime (OSNumDateTime *pvalue, struct tm *timeStruct)
 This function converts a structure of type 'struct tm' to an OSNumDateTime structure.
int rtxSetLocalDateTime (OSNumDateTime *pvalue, time_t timeMs)
 This function converts a local date and time value to an OSNumDateTime structure.
int rtxSetUtcDateTime (OSNumDateTime *pvalue, time_t timeMs)
 This function converts a UTC date and time value to an OSNumDateTime structure.
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_t.
OSBOOL rtxDateTimeIsValid (const OSNumDateTime *pvalue)
 This function verifies that all members of the OSNumDateTime structure contains valid values.

Detailed Description

Common runtime functions for converting to and from various standard date/time formats.

Definition in file rtxDateTime.h.