#include "cgeneral.h"#include "cdate.h"Functions | |
| char * | JpmcdsFormatDate (TDate date) |
| Formats a TDate for printing. | |
| char * | JpmcdsFormatDateInterval (TDateInterval *interval) |
| Formats a TDateInterval. | |
| int | JpmcdsStringToDate (char *mmddyyyy, TDate *tdate) |
| Converts a date in string format to a TDate. | |
| int | JpmcdsStringToDateInterval (char *input, char *label, TDateInterval *interval) |
| Converts a string representation ("2Y", "1S", etc) to a TDateInterval. | |
| int | JpmcdsMakeDateInterval (int numPeriods, char periodType, TDateInterval *interval) |
| Makes a TDateInterval. | |
| char* JpmcdsFormatDate | ( | TDate | date | ) |
Formats a TDate for printing.
The print format is YYYYMMDD. Can be called eight times from the same print statement, but not more.
| char* JpmcdsFormatDateInterval | ( | TDateInterval * | interval | ) |
Formats a TDateInterval.
Can be called twice from the same print statement, but not more.
| int JpmcdsMakeDateInterval | ( | int | numPeriods, | |
| char | periodType, | |||
| TDateInterval * | interval | |||
| ) |
Makes a TDateInterval.
| numPeriods | (I) Number of periods (Can be negative) | |
| periodType | (I) Period type (D,W,M,S,Q,A,I,J,K,E) | |
| interval | (O) |
| int JpmcdsStringToDate | ( | char * | mmddyyyy, | |
| TDate * | tdate | |||
| ) |
Converts a date in string format to a TDate.
The following formats are accepted: "YYYYMMDD", "MM/DD/YYYY", "Mth-DD-YYYY", and "DD-Mth-YYYY".
| mmddyyyy | (I) Month/Day/Year format | |
| tdate | (O) TDate |
| int JpmcdsStringToDateInterval | ( | char * | input, | |
| char * | label, | |||
| TDateInterval * | interval | |||
| ) |
Converts a string representation ("2Y", "1S", etc) to a TDateInterval.
Number optional, default is 1, hence, e.g., "M" (= "1M") is valid.
| input | (I) String w/ 1A, 3M, 4D, etc | |
| label | (I) Label-for JpmcdsErr Msg only | |
| interval | (O) Value read from file |