|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|

Go to the source code of this file.
Functions | |
| int | dayofweek (double j) |
| Given a Julian day number, return the day of week for that date. More... | |
| int | days_in_month (int year, int month) |
| double | days_in_year (int year) |
| How many days are in the given Gregorian year? More... | |
| void | days_to_month_day (int year, int ddd, int *month, int *day) |
| Given the day number of the year, return the month and day of the month. More... | |
| void | gregorian_date (double jd, int *year, int *month, int *day, int *hours, int *minutes, double *sec) |
| Given a Julian day number, return the Gregorian date. More... | |
| int | is_leap (int year) |
| Is the given Gregorian year a leap year? More... | |
| long | julian_day (int year, int month, int day) |
| Given a gregorian date in year, month and day, return the Julian day number. More... | |
| int | month_day_to_days (int year, int month, int day) |
| Given the month and day numbers, return the days since the first of the year. More... | |
| int dayofweek | ( | double | j | ) |
Given a Julian day number, return the day of week for that date.
Definition at line 257 of file date_proc.cc.
| int days_in_month | ( | int | year, |
| int | month | ||
| ) |
Definition at line 191 of file date_proc.cc.
References is_leap().
Referenced by operator==(), and operator>=().

| double days_in_year | ( | int | year | ) |
How many days are in the given Gregorian year?
Definition at line 59 of file date_proc.cc.
References is_leap().
Referenced by DODS_Date::fraction(), and DODS_Date_Time::get().

| void days_to_month_day | ( | int | year, |
| int | ddd, | ||
| int * | month, | ||
| int * | day | ||
| ) |
Given the day number of the year, return the month and day of the month.
| year | The year. |
| ddd | The day of the year (ones-based). |
| month | The correcponding month of the year (ones-based value-result parameter). |
| day | The day of the month (ones-based value-result parameter). |
Definition at line 238 of file date_proc.cc.
References assert, and is_leap().
Referenced by DODS_Date::set().

| void gregorian_date | ( | double | jd, |
| int * | year, | ||
| int * | month, | ||
| int * | day, | ||
| int * | hours, | ||
| int * | minutes, | ||
| double * | seconds | ||
| ) |
Given a Julian day number, return the Gregorian date.
The Julian day number is passed as a double while the gregorian date is returned using six `value-result' parameters:
| jd | The Julian date to convert. |
| year | The year fully-qualified (1977 is `1977' not 77, `77' is 77 A.D.) |
| month | The month. Ones-based. |
| day | The day. |
| hours | The hour. zero-based. |
| minutes | The minutes. zero-based. |
| seconds | The seconds. zero-based. |
Definition at line 121 of file date_proc.cc.
| int is_leap | ( | int | year | ) |
Is the given Gregorian year a leap year?
Definition at line 52 of file date_proc.cc.
Referenced by days_in_month(), days_in_year(), and days_to_month_day().
| long julian_day | ( | int | year, |
| int | month, | ||
| int | day | ||
| ) |
Given a gregorian date in year, month and day, return the Julian day number.
NB: I am not sure this code deals correctly with dates before 1100 A.D.
| year | The year. Must be A.D. and `fully qualified' |
| month | The month. Ones-based month number (Jan = 1, Dec = 12). |
| day | The day. Ones-based day number. |
Definition at line 86 of file date_proc.cc.
References L.
Referenced by operator<=(), operator==(), and operator>=().
| int month_day_to_days | ( | int | year, |
| int | month, | ||
| int | day | ||
| ) |
Given the month and day numbers, return the days since the first of the year.
| year | The year. |
| month | The month of the year. |
| day | The days of the month. |
Definition at line 169 of file date_proc.cc.
Referenced by DODS_Date::set().