common/yyyymmdd_wk.h File Reference

Go to the source code of this file.

Functions

int yyyymmdd_to_wday (int yyyy, int mm, int dd)
int days_in_month (int year, int month)


Function Documentation

int days_in_month ( int  year,
int  month 
)

The days_in_month function may be used to calculate the number of days in a month, given the year and the month.

Parameters:
year The year as all 4 digits, e.g. 1997 or 2004, etc (this is not the same as tm_year.)
month The month number, in the range 1..12 (this is not the same as tm_mon.)
Returns:
int; number of days in the month.

int yyyymmdd_to_wday ( int  yyyy,
int  mm,
int  dd 
)

The yyyymmdd_to_wday function is used to turn a date in years months and days into a weekday number (as described by the localtime(3) man page) Sunday=0.

Parameters:
yyyy The year as all 4 digits, e.g. 1997 or 2004, etc (this is not the same as tm_year.)
mm The month number, in the range 1..12 (this is not the same as tm_mon.)
dd The day number, in the range 1..31 (this is not the same as tm_mon.)
Returns:
The day of the week, in the range 0..6; Sunday = 0.


Generated on Wed Mar 12 23:37:36 2008 for Aegis by  doxygen 1.5.5