Date Functions |
---|
See The Julian and the Gregorian Calendars for historical and theoretical background to this subject.The functions described here all declared in the header file L_DATE.H. This header file should be #included in any source module which uses a date function from this library.
General Explanatory Remarks
Brief Descriptions of the Functions
(with links to full descriptions and sample programs)
date_earlier() Reports if one date is earlier than another. date_to_days_since_111() Returns days since 1901-01-01 for a particular date. date_to_iso_date() Converts a Date structure to a date string in ISO format. date_to_str() Converts a date to a character string with user-specified date format. date_valid() Reports if a date is a valid date. The documentation for the following functions is provided with a user license:
day_name() Returns "Sunday", etc. day_of_week() Returns day-of-week for a particular date. days_elapsed() Returns number of days elapsed from one date to another.. days_in_date_range() Returns number of days in a range of dates. days_in_month() Returns number of days in a given month. days_in_year() Returns number of days in a given year. days_since_111_to_date() Returns date for number of days since 1901-01-01. euro_date_to_jdn() Converts a date in either the Gregorian or the Julian Calendar to a Julian day number. euro_day_of_week() Returns day-of-week for a given Julian day number. fvf_euro_date_to_jdn() Converts a date in the Gregorian Calendar to a Julian day number. fvf_jdn_to_euro_date() Converts a Julian day number to a date in the Gregorian calendar. get_system_date() Fills in a Date structure with the system date. is_euro_leap_year() Reports if a year is a leap year. is_weekday() Reports if a date is a weekday. iso_date_to_date() Fills in a Date structure from a date string in ISO format. jdn_to_euro_date() Converts a Julian day number to a date in either the Gregorian or the Julian Calendar. month_name() Returns "January", etc. next_date() Gets the next date.. nth_day_of_wk() Finds the nth day-of-week on or after a given date. previous_date() Gets the previous date. rom_bios_date() Returns the ROM BIOS date. set_date_format_default() Sets up the default date format. set_language() Specifies language (currently English or German). set_system_date() Sets the system date. sltoa_commas() Converts a signed long int to a string using comma-separated thousands. sltoa_intl() Converts a signed long int to a string using a specified thousands-separator str_to_date() Fills in a Date structure from a date string. weekday_jan_1st() The day of the week for January 1 of a given year in a given calendar. weekdays_in_date_range() Returns the number of weekdays in a time period. weekdays_in_month() Returns the number of weekdays in a given month. weekdays_in_year() Returns the number of weekdays in a given year. yeartoa() Converts a year (a signed long int) to a string using comma-separated thousands. yeartoa_intl() Converts a year (a signed long int) to a string using a specified thousands-separator.
![]() |
Index |
Home Page |