Re: [PHP] Calendar/Date

2009-03-18 Thread Hans Ã…hlin
Weeks in a year is 52 or 53 Days in a year is 365 and if a leap year 366 If ( (365 (Days Of a year) * (Years From 1940)) + (Number of leap years since 1940, (Years From 1940 / 4) (if its a Leap year -1)) + ((Days >From 01-01) + 1) % 7 = (0-6 where 0 = Monday) ) is less then 3 (Thursday) then it

Re: [PHP] Calendar/Date

2009-03-18 Thread Paul M Foster
On Wed, Mar 18, 2009 at 12:57:39PM -0400, Bob McConnell wrote: > From: Paul M Foster > > On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote: > >> > >>> You also need to be aware that on 32 bit Unix and Linux systems the > >> behavior of mktime() on dates after Jan 18, 2038 is undefined

RE: [PHP] Calendar/Date

2009-03-18 Thread Bob McConnell
From: Paul M Foster > On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote: >> >>> You also need to be aware that on 32 bit Unix and Linux systems the >> behavior of mktime() on dates after Jan 18, 2038 is undefined. The 32 >> bit counter overflows early on the 19th, so any value returned

Re: [PHP] Calendar/Date

2009-03-18 Thread Paul M Foster
On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote: > From: Paul M Foster > > You also need to be aware that on 32 bit Unix and Linux systems the > behavior of mktime() on dates after Jan 18, 2038 is undefined. The 32 > bit counter overflows early on the 19th, so any value returned

RE: [PHP] Calendar/Date

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 11:46 -0400, Bob McConnell wrote: > From: Paul M Foster > > On Tue, Mar 17, 2009 at 08:52:11PM -0700, Jason Todd Slack-Moehrle > wrote: > > > >> Hi All, > >> > >> Does anyone have code and/or advice for how to get get the current > >> week (with a passed current day, say) and

RE: [PHP] Calendar/Date

2009-03-18 Thread Bob McConnell
From: Paul M Foster > On Tue, Mar 17, 2009 at 08:52:11PM -0700, Jason Todd Slack-Moehrle wrote: > >> Hi All, >> >> Does anyone have code and/or advice for how to get get the current >> week (with a passed current day, say) and what then end date is at >> Saturday. >> >> So take today: Tuesday Marc

Re: [PHP] Calendar/Date

2009-03-18 Thread Robert Cummings
On Tue, 2009-03-17 at 20:52 -0700, Jason Todd Slack-Moehrle wrote: > Hi All, > > Does anyone have code and/or advice for how to get get the current > week (with a passed current day, say) and what then end date is at > Saturday. > > So take today: Tuesday March 17, 2009 > > I want to get: >

Re: [PHP] Calendar/Date

2009-03-17 Thread Paul M Foster
On Tue, Mar 17, 2009 at 08:52:11PM -0700, Jason Todd Slack-Moehrle wrote: > Hi All, > > Does anyone have code and/or advice for how to get get the current > week (with a passed current day, say) and what then end date is at > Saturday. > > So take today: Tuesday March 17, 2009 > > I want to get: >

[PHP] Calendar/Date

2009-03-17 Thread Jason Todd Slack-Moehrle
Hi All, Does anyone have code and/or advice for how to get get the current week (with a passed current day, say) and what then end date is at Saturday. So take today: Tuesday March 17, 2009 I want to get: Sunday March 15, 2009 Monday March 16, 2009 Tuesday March 17, 2009 Wednesday March 18

Re: [PHP] Calendar Date Help

2008-05-28 Thread Mark Weaver
Robert Cummings wrote: function getStamp($dateStr,$dayVal=1){ return date('U',mktime(0,0,0, $dateStr,$dayVal,date('Y'))); } ^ ^

Re: [PHP] Calendar Date Help

2008-05-28 Thread Robert Cummings
On Wed, 2008-05-28 at 14:27 -0400, Mark Weaver wrote: > Hi all, > > I've put this off as long as possible, however I think I've reached an > impasse. > > I've got an application that I've been writing. One of the modules for > this app is an event calendar. I've got the calendar to the place w

[PHP] Calendar Date Help

2008-05-28 Thread Mark Weaver
Hi all, I've put this off as long as possible, however I think I've reached an impasse. I've got an application that I've been writing. One of the modules for this app is an event calendar. I've got the calendar to the place where it displays the current month as well as previous and future