|
|
 |
 |
|
Date/time conversion functionsThese functions handle the conversion of date/time to and from various internal formats to XML schema standard string forms.
More...
|
Functions |
| int | rtxDateToString (const OSXSDDateTime *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 OSXSDDateTime *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 OSXSDDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| | This function formats a numeric date/time value of all components in the OSXSDDateTime structure into XML schema standard format (CCYY-MM-DDTHH:MM:SS[.frac][TZ]).
|
| int | rtxGYearToString (const OSXSDDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| | This function formats a gregorian year value to a string (CCYY).
|
| int | rtxGYearMonthToString (const OSXSDDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| | This function formats a gregorian year and month value to a string (CCYY-MM).
|
| int | rtxGMonthToString (const OSXSDDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| | This function formats a gregorian month value to a string (MM).
|
| int | rtxGMonthDayToString (const OSXSDDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| | This function formats a gregorian month and day value to a string (MM-DD).
|
| int | rtxGDayToString (const OSXSDDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| | This function formats a gregorian day value to a string (DD).
|
| int | rtxGetCurrDateTime (OSXSDDateTime *pvalue) |
| | This function reads the system date and time and stores the value in the given OSXSDDateTime structure variable.
|
| int | rtxCmpDate (const OSXSDDateTime *pvalue1, const OSXSDDateTime *pvalue2) |
| | This function compares the date part of two OSXSDDateTime structures and returns the result of the comparison.
|
| int | rtxCmpDate2 (const OSXSDDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo) |
| | This function compares the date part of OSXSDDateTime structure and date components, specified as parameters.
|
| int | rtxCmpTime (const OSXSDDateTime *pvalue1, const OSXSDDateTime *pvalue2) |
| | This function compares the time part of two OSXSDDateTime structures and returns the result of the comparison.
|
| int | rtxCmpTime2 (const OSXSDDateTime *pvalue, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo) |
| | This function compares the time part of OSXSDDateTime structure and time components, specified as parameters.
|
| int | rtxCmpDateTime (const OSXSDDateTime *pvalue1, const OSXSDDateTime *pvalue2) |
| | This function compares two OSXSDDateTime structures and returns the result of the comparison.
|
| int | rtxCmpDateTime2 (const OSXSDDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo) |
| | This function compares the OSXSDDateTime structure and dateTime components, specified as parameters.
|
| int | rtxParseDateString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a date value from a supplied string and sets the given OSXSDDateTime argument to the decoded date value.
|
| int | rtxParseTimeString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a time value from a supplied string and sets the given OSXSDDateTime structure to the decoded time value.
|
| int | rtxParseDateTimeString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a datetime value from a supplied string and sets the given OSXSDDateTime to the decoded date and time value.
|
| int | rtxParseGYearString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a gregorian year value from a supplied string and sets the year in the given OSXSDDateTime to the decoded value.
|
| int | rtxParseGYearMonthString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a gregorian year and month value from a supplied string and sets the year and month fields in the given OSXSDDateTime to the decoded values.
|
| int | rtxParseGMonthString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a gregorian month value from a supplied string and sets the month field in the given OSXSDDateTime to the decoded value.
|
| int | rtxParseGMonthDayString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a gregorian month and day value from a supplied string and sets the month and day fields in the given OSXSDDateTime to the decoded values.
|
| int | rtxParseGDayString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSXSDDateTime *pvalue) |
| | This function decodes a gregorian day value from a supplied string and sets the day field in the given OSXSDDateTime 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 (OSXSDDateTime *pvalue, struct tm *timeStruct) |
| | This function converts a structure of type 'struct tm' to an OSXSDDateTime structure.
|
| int | rtxSetLocalDateTime (OSXSDDateTime *pvalue, time_t timeMs) |
| | This function converts a local date and time value to an OSXSDDateTime structure.
|
| int | rtxSetUtcDateTime (OSXSDDateTime *pvalue, time_t timeMs) |
| | This function converts a UTC date and time value to an OSXSDDateTime structure.
|
| int | rtxGetDateTime (const OSXSDDateTime *pvalue, time_t *timeMs) |
| | This function converts an OSXSDDateTime structure to a calendar time encoded as a value of type time_t.
|
Detailed Description
These functions handle the conversion of date/time to and from various internal formats to XML schema standard string forms.
Function Documentation
|
|
This function compares the date part of two OSXSDDateTime structures and returns the result of the comparison.
- Parameters:
-
- Returns:
- Completion status of operation:
- 0 Dates are same
- +1 First Date/Time is greater than second.
- -1 First Date/Time is less than second.
|
|
|
This function compares the date part of OSXSDDateTime structure and date components, specified as parameters.
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure. |
| year | Year (-inf..inf) |
| mon | Month (1..12) |
| day | Day (1..31) |
| tzflag | TRUE, if time zone offset is set (see tzo parameter). |
| tzo | Time zone offset (-1440..1440). |
- Returns:
- Completion status of operation:
- 0 Dates are same
- +1 First Date/Time is greater than second.
- -1 First Date/Time is less than second.
|
|
|
This function compares two OSXSDDateTime structures and returns the result of the comparison.
- Parameters:
-
- Returns:
- Completion status of operation:
- 0 Dates are same
- +1 First Date/Time is greater than second.
- -1 First Date/Time is less than second.
|
|
|
This function compares the OSXSDDateTime structure and dateTime components, specified as parameters.
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure. |
| year | Year (-inf..inf) |
| mon | Month (1..12) |
| day | Day (1..31) |
| hour | Hour (0..23) |
| min | Minutes (0..59) |
| sec | Seconds (0.0..59.(9)) |
| tzflag | TRUE, if time zone offset is set (see tzo parameter). |
| tzo | Time zone offset (-1440..1440). |
- Returns:
- Completion status of operation:
- 0 Dates are same
- +1 First Date/Time is greater than second.
- -1 First Date/Time is less than second.
|
|
|
This function compares the time part of two OSXSDDateTime structures and returns the result of the comparison.
- Parameters:
-
- Returns:
- Completion status of operation:
- 0 Times are same
- +1 First Date/Time is greater than second.
- -1 First Date/Time is less than second.
|
|
|
This function compares the time part of OSXSDDateTime structure and time components, specified as parameters.
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure. |
| hour | Hour (0..23) |
| min | Minutes (0..59) |
| sec | Seconds (0.0..59.(9)) |
| tzflag | TRUE, if time zone offset is set (see tzo parameter). |
| tzo | Time zone offset (-1440..1440). |
- Returns:
- Completion status of operation:
- 0 Times are same
- +1 First Date/Time is greater than second.
- -1 First Date/Time is less than second.
|
|
|
This function formats a numeric date/time value of all components in the OSXSDDateTime structure into XML schema standard format (CCYY-MM-DDTHH:MM:SS[.frac][TZ]).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing date/time components to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string. |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
|
This function formats a numeric date value consisting of individual date components (year, month, day) into XML schema standard format (CCYY-MM-DD).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing date components to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is at least nine bytes long to hold the formatted date and a null-terminator character. |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
-
0(RT_OK) = success,
-
negative return value is error
|
|
|
This function converts a duration string to milliseconds.
In the case of a string prepended with a minus sign (-) the duration in milliseconds will have negative value.
- Parameters:
-
| buf | Pointer to OSUTF8CHAR array. |
| bufsize | OSINT32 indicates the bufsize to be read. |
| msecs | OSINT32 updated after calculation. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_TOOBIG). Return value is taken from rtxErrCodes.h header file
|
|
|
This function formats a gregorian day value to a string (DD).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing day value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 3 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
|
This function reads the system date and time and stores the value in the given OSXSDDateTime structure variable.
- Parameters:
-
- Returns:
- Completion status of operation:
- 0 in case success
- negative in case failure
|
| int rtxGetDateTime |
( |
const OSXSDDateTime * |
pvalue, |
|
|
time_t * |
timeMs |
|
) |
|
|
|
|
This function converts an OSXSDDateTime structure to a calendar time encoded as a value of type time_t.
- Parameters:
-
| pvalue | The pointed OSXSDDateTime structure variable to be converted. |
| timeMs | A pointer to time_t value to be set. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
|
|
|
This function formats a gregorian month and day value to a string (MM-DD).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing month and day value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 6 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
|
This function formats a gregorian month value to a string (MM).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing month value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 3 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
|
This function formats a gregorian year and month value to a string (CCYY-MM).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing year and month value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 8 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
|
This function formats a gregorian year value to a string (CCYY).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing year value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 5 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
|
This function converts millisecs to a duration string with format "PnYnMnDTnHnMnS".
In case of negative duration a minus sign is prepended to the output string - Parameters:
-
| msecs | Number of milliseconds. |
| buf | Output buffer to recieve formatted duration. |
| bufsize | Output buffer size. |
- Returns:
- Completion status of operation: 0 successful are same -1 unsuccessul
|
|
|
This function decodes a date value from a supplied string and sets the given OSXSDDateTime argument to the decoded date value.
- Parameters:
-
| inpdata | Date string to be parsed/decoded as OSXSDDateTime.
-
The format of date is CCYY-MM-DD
-
The value of CCYY is from 0000-9999
-
The value of MM is 01 - 12
-
The value of DD is 01 - XX (where XX is the Days in MM month in CCYY year)
|
| inpdatalen | For decoding, consider inpdata string up to this length. |
| pvalue | The OSXSDDateTime structure variable will be set to the decoded date value.
- Only year, month,day value will be set.
- The value of pvalue->year is in range 0 to 9999
- The value of pvalue->mon is in range 1 to 12
- The value of pvalue->day is in range 1 to XX
|
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a datetime value from a supplied string and sets the given OSXSDDateTime to the decoded date and time value.
- Parameters:
-
| inpdata | Input date/time string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The pointed OSXSDDateTime structure variable will be set to the decoded date and time value. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a gregorian day value from a supplied string and sets the day field in the given OSXSDDateTime to the decoded value.
- Parameters:
-
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The day field in the given OSXSDDateTime variable will be set to the decoded value. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a gregorian month and day value from a supplied string and sets the month and day fields in the given OSXSDDateTime to the decoded values.
- Parameters:
-
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The month and day fields in the given OSXSDDateTime variable will be set to the decoded values. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a gregorian month value from a supplied string and sets the month field in the given OSXSDDateTime to the decoded value.
- Parameters:
-
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The month field in the given OSXSDDateTime variable will be set to the decoded value. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a gregorian year and month value from a supplied string and sets the year and month fields in the given OSXSDDateTime to the decoded values.
- Parameters:
-
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The year and month fields in the given OSXSDDateTime variable will be set to the decoded value. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a gregorian year value from a supplied string and sets the year in the given OSXSDDateTime to the decoded value.
- Parameters:
-
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The year field in the given OSXSDDateTime structure variable will be set to the decoded value. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
|
|
This function decodes a time value from a supplied string and sets the given OSXSDDateTime structure to the decoded time value.
- Parameters:
-
| inpdata | The inpdata is a time string to be parsed/decoded as OSXSDDateTime.
- The format of date is hh:mm:ss.ss (1) or hh:mm:ss.ssZ (2) or hh:mm:ss.ss+HH:MM (3) or hh:mm:ss.ss-HH:MM (4)
- The value of hh is from 00-23
- The value of mm is 00 - 59
- The value of ss.ss is 00.00 - 59.99
- The value of HH:MM is 00.00 - 24.00
|
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The OSXSDDateTime structure variable will be set to the decoded time value.
- Only hour, min, sec value will be set.
- The value of pvalue->hour is in range 0 to 23
- The value of pvalue->mon is in range 0 to 59
- The value of pvalue->day is in range 0 to 59.99
- The value of pvalue->tz_flag is FALSE for format(1) otherwise TRUE
- The value of pvalue->tzo is 0 for format(2) otherwise Calculation of pvalue->tzo for format (3),(4) is HH*60+MM
- The value of pvalue->tzo is -1440 <= tzo <= 1440 for format(3),(4) otherwise
|
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error (RTERR_NOTINIT/RTERR_INVFORMAT/RTERR_BADVALUE). Return value is taken from rtxErrCodes.h header file
|
| int rtxSetDateTime |
( |
OSXSDDateTime * |
pvalue, |
|
|
struct tm * |
timeStruct |
|
) |
|
|
|
|
This function converts a structure of type 'struct tm' to an OSXSDDateTime structure.
- Parameters:
-
| pvalue | The pointed OSXSDDateTime structure variable will be set to time value. |
| timeStruct | A pointer to tm structure to be converted. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
|
| int rtxSetLocalDateTime |
( |
OSXSDDateTime * |
pvalue, |
|
|
time_t |
timeMs |
|
) |
|
|
|
|
This function converts a local date and time value to an OSXSDDateTime structure.
- Parameters:
-
| pvalue | The pointed OSXSDDateTime structure variable will be set to time value. |
| timeMs | A calendar time encoded as a value of type time_t. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
|
|
|
This function converts a UTC date and time value to an OSXSDDateTime structure.
- Parameters:
-
| pvalue | The pointed OSXSDDateTime structure variable will be set to time value. |
| timeMs | A calendar time encoded as a value of type time_t. The time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
|
|
|
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]).
- Parameters:
-
| pvalue | Pointer to OSXSDDateTime structure containing time components to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string. |
| bufsize | Size of the buffer to receive the formatted date. |
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
|
|
This file was last modified on
8 Jan 2007. XBinder, Version 1.1.9 |