45 #ifndef Included_RexxDateTime
46 #define Included_RexxDateTime
51 #define MAXCIVILHOURS 12
55 #define HOURS_IN_DAY 24
56 #define MINUTES_IN_HOUR 60
57 #define SECONDS_IN_MINUTE 60
60 #define SECONDS_IN_HOUR (SECONDS_IN_MINUTE * MINUTES_IN_HOUR)
62 #define SECONDS_IN_DAY (SECONDS_IN_HOUR * HOURS_IN_DAY)
63 #define MINUTES_IN_DAY (MINUTES_IN_HOUR * HOURS_IN_DAY)
64 #define MICROSECONDS 1000000
65 #define MICROSECONDS_IN_DAY ((int64_t)SECONDS_IN_DAY * (int64_t)MICROSECONDS)
68 #define BASE_DAYS(year) (((year) * 365) + ((year) / 4) - ((year) / 100) + ((year) / 400))
70 #define OLYMPIAD_DAYS BASE_DAYS(400)
71 #define CENTURY_DAYS BASE_DAYS(100)
72 #define LEAP_DAYS BASE_DAYS(4)
85 #define MINUTES_SIZE 2
86 #define SECONDS_SIZE 2
89 #define PAST_THRESHOLD 50
90 #define FUTURE_THRESHOLD 49
91 #define POSTMERIDIAN "pm"
92 #define ANTEMERIDIAN "am"
94 #define LeapYear(year) ((!(year % LEAP_CYCLE)) && ((year % CENTURY) || (!(year % OLYMPIAD))))
161 void formatUsaDate(
char *buffer,
size_t size,
const char *sep);
void formatNormalDate(char *buffer, size_t size, const char *sep)
static const char * monthNames[]
void formatMinutes(char *buffer, size_t size)
wholenumber_t getTimeSeconds()
void formatHours(char *buffer, size_t size)
wholenumber_t getWeekDay()
static const char * dayNames[]
void formatNormalTime(char *buffer, size_t size)
void formatBaseTime(char *buffer)
void formatBaseDate(char *buffer, size_t size)
void formatWeekDay(char *buffer)
void setDate(wholenumber_t newYear, wholenumber_t newDay)
void formatMonthName(char *buffer)
wholenumber_t getYearDay()
bool setMinutes(wholenumber_t m)
void formatCivilTime(char *buffer, size_t size)
bool setBaseDate(wholenumber_t basedays)
void setTimeInSeconds(wholenumber_t basetime)
bool parseUsaDate(const char *date, const char *sep, wholenumber_t currentYear)
bool parseOrderedDate(const char *date, const char *sep, wholenumber_t currentYear)
bool getNumber(const char *input, wholenumber_t length, int *target)
void formatLongTime(char *buffer, size_t size)
bool parseNormalTime(const char *date)
void formatTimeZone(char *buffer)
void formatUsaDate(char *buffer, size_t size, const char *sep)
void formatSeconds(char *buffer, size_t size)
bool parseLongTime(const char *date)
static RexxDateTime maxBaseTime
bool parseEuropeanDate(const char *date, const char *sep, wholenumber_t currentYear)
bool parseCivilTime(const char *date)
const char * getDayName()
void formatDays(char *buffer, size_t size)
const char * getMonthName()
void formatStandardDate(char *buffer, size_t size, const char *sep)
static int leapMonthStarts[]
bool parseDateTimeFormat(const char *date, const char *format, const char *sep, wholenumber_t currentYear)
bool setBaseTime(int64_t basetime)
bool setHours(wholenumber_t h)
bool parseStandardDate(const char *date, const char *sep)
bool parseNormalDate(const char *date, const char *sep)
bool adjustTimeZone(int64_t o)
bool setUnixTime(int64_t basetime)
void formatEuropeanDate(char *buffer, size_t size, const char *sep)
void setDay(wholenumber_t basedays)
static RexxDateTime unixBaseTime
wholenumber_t getBaseDate()
void formatUnixTime(char *buffer)
void formatOrderedDate(char *buffer, size_t size, const char *sep)
void setTimeZoneOffset(int64_t o)
int64_t getTimeZoneOffset()
bool setSeconds(wholenumber_t s)