I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 1.40
sub units 0.00
+
0
UnitsDate

first Monday

Returns the date in January when the first Monday occurs.
Controller: CodeCogs

get GPL add to cart

Interface

C++
Excel
HTML

FirstMonday

 
intfirstMondayintyear )[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

yearcan 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.