Aegis  4.25.D505
Functions
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:
yearThe year as all 4 digits, e.g. 1997 or 2004, etc (this is not the same as tm_year.)
monthThe 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:
yyyyThe year as all 4 digits, e.g. 1997 or 2004, etc (this is not the same as tm_year.)
mmThe month number, in the range 1..12 (this is not the same as tm_mon.)
ddThe 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.