Hi,
I'm really having trouble with this :(
Basically, I'm trying to build a calendar box, like so:
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
(the above is done with Date::Calc::Calendar(2007,8); , but its plain text formatting - and I would rather format it manually into tables/cells etc).
Now, I could do this once I have the following paramaters -
1) The start day
2) The number of days in a given month
The 2nd one, is pretty simple:
my $days = Days_in_Month($year,$month);
..but the 1st one has me stumped.
Does anyone have a good way of working out the day the 1st of a given month falls on?
TIA!
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I'm really having trouble with this :(
Basically, I'm trying to build a calendar box, like so:
Code:
August 2007 Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
(the above is done with Date::Calc::Calendar(2007,8); , but its plain text formatting - and I would rather format it manually into tables/cells etc).
Now, I could do this once I have the following paramaters -
1) The start day
2) The number of days in a given month
The 2nd one, is pretty simple:
my $days = Days_in_Month($year,$month);
..but the 1st one has me stumped.
Does anyone have a good way of working out the day the 1st of a given month falls on?
TIA!
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!