first Monday
Returns the date in January when the first Monday occurs.
Controller: CodeCogs
| intfirstMonday( | int | year | )[inline] |
Computes the number of days from the start of the year to the first Monday of the year (inclusive). This is the same as the date in January with the first Monday.
Example 1
#include <stdio.h> #include <codecogs/units/date/firstMonday.h> using namespace Units::Date; int main() { for(int i=2000;i<2004;i++) printf("\n The first Monday in year %d is on the %d January", i, firstMonday(i)); return 0; }
Output:The first Monday in year 2000 is on the 3 January The first Monday in year 2001 is on the 1 January The first Monday in year 2002 is on the 7 January The first Monday in year 2003 is on the 6 January
Parameters
year can be any integer greater than -4799.
Authors
- Will Bateman (Oct 2004)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.



1.40
