35#ifndef _MTIME_CALENDAR_H
36#define _MTIME_CALENDAR_H
38extern const int NO_OF_SEC_IN_A_DAY;
39extern const int NO_OF_SEC_IN_A_HOUR;
40extern const int NO_OF_SEC_IN_A_MINUTE;
42extern const int NO_OF_MS_IN_A_DAY;
43extern const int NO_OF_MS_IN_HALF_DAY;
44extern const int NO_OF_MS_IN_A_HOUR;
45extern const int NO_OF_MS_IN_A_MINUTE;
46extern const int NO_OF_MS_IN_A_SECOND;
58#define NO_OF_DAYS_IN_A_MONTH_FOR_CAL_TYPE360 30
60#define NO_OF_MONTHS_IN_A_YEAR 12
61#define NO_OF_HOURS_IN_A_DAY 24
63#define NO_OF_DAYS_IN_A_YEAR_FOR_CAL_TYPE360 360
64#define NO_OF_DAYS_IN_A_YEAR_FOR_CAL_TYPE365 365
65#define NO_OF_DAYS_IN_A_LEAP_YEAR 366
67#define NO_OF_DAYS_IN_400_YEARS 146097
69#define YEAR_UPPER_BOUND 2147483647
70#define YEAR_LOWER_BOUND -2147483648
72#define POSIXSTRING_DAY_LOWER_BOUND 15
73#define POSIXSTRING_MONTH_LOWER_BOUND 10
74#define POSIXSTRING_YEAR_LOWER_BOUND 1582
75#define POSIXSTRING_YEAR_UPPER_BOUND 9999
78#define MAX_CALENDAR_STR_LEN 32
79#define MAX_DATETIME_STR_LEN 32
80#define MAX_DATE_STR_LEN 32
81#define MAX_TIME_STR_LEN 32
82#define MAX_TIMEDELTA_STR_LEN 32
83#define MAX_JULIANDAY_STR_LEN 32
89extern const char initDummyTDString[];
90extern const char initDummyDString[];
91extern const char initDummyDTString[];
93extern const int nofDaysAfterARGMonthsInLeapYear[13];
94extern const int nofDaysAfterARGMonthsInNonLeapYear[13];
96extern const int nofDaysInARGMonthInLeapYear[];
97extern const int nofDaysInARGMonthIn365DayYear[];
98extern const int nofDaysInARGMonthIn360DayYear[];
100extern const int monthSpecificDeltaInMonthsLeapyear[12][13];
101extern const int monthSpecificDeltaInMonths365[12][13];
102extern const int monthSpecificDeltaInMonths360[12][13];
struct _date date
Date elements.
Definition mtime_datetime.h:37
calendarType
enum calendarType lists the calendarTypes supported. The values are used for selecting calendars.
Definition mtime_calendar.h:120
char * calendarToString(char *calendar)
convert the calendar identifier into a human readable string.
Definition mtime_calendar.c:188
void freeCalendar(void)
called to discard the selected calendar type.
Definition mtime_calendar.c:157
calendarType getCalendarType(void)
To query the current calendar type.
Definition mtime_calendar.c:173
void initCalendar(calendarType ct)
To initialize a new calendar.
Definition mtime_calendar.c:114
@ YEAR_OF_365_DAYS
365 day year without leap years.
Definition mtime_calendar.h:123
@ CALENDAR_NOT_SET
calendar is not defined yet.
Definition mtime_calendar.h:121
@ PROLEPTIC_GREGORIAN
proleptic Gregorian calendar.
Definition mtime_calendar.h:122
@ YEAR_OF_360_DAYS
360 day year with 30 day months.
Definition mtime_calendar.h:124
struct _datetime contains a struct _date and a struct _time element.
Definition mtime_datetime.h:36
Struct _julianday containing julian day parameters.
Definition mtime_julianDay.h:32