Re: Date code
From: Jeroen (info_at_nospam.be-be-hosted)
Date: 10/23/03
- Next message: Jeroen: "Re: Date code"
- Previous message: Tim Van Wassenhove: "Re: Date code"
- In reply to: Jerry Gitomer: "Re: Date code"
- Next in thread: Tim Van Wassenhove: "Re: Date code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 14:21:32 GMT
"Jerry Gitomer" <jgitomer@erols.com> schreef in bericht
news:pan.2003.10.23.14.14.25.791491@erols.com...
> On Thu, 23 Oct 2003 11:25:03 +0000, Jeroen wrote:
>
> > Hi,
> >
> > I'm searching but not finding :(
> >
> > I need the code that creates automatic the days in a month
> >
> > So like for this month, it creates the days in this format 01-Oct,
> > 02-Oct, ...
> > > This should be used in a form so when opening the page, automatic all
> > > the
> > days of that specific month
> > are listed, and when saving those dates are saved in the database
> > (MySql)
> >
> > Monday is the start of the week and the weekends (sat-sun) should be
> > marked in another collor.
> >
> > I hope someone can help me with this, because I'm trying to make this
> > for about 2 weeks now, and all I've got are errors :s
> >
> > Many Thx,
> >
> > Jeroen
> >
> > ----
>
> Jeroen,
>
> I don't have a worked out example in PHP for Zoeller's (sp?) algorithm for
> determining the day of the week, but I did find a web site page that has
> several algorithms, one of which I think will meet your needs.
>
> The URL is:
> http://www.m2c3.com/alpocs/Library/Articles/nuts_and_bolts/nuts_part1.htm
>
> No, this will not give you a calendar in the form you are seeking, but it
> will give you a means of determining the day of the week of the first day
> of the month. You can then build your own array for the month. If you
> can use HTML for your output you can then use the array to load a table
> which can be viewed or printed.
>
> HTH
>
> Jerry
Hey Jerry,
Thx for the link even it's written for VB it can help a hand to understand
the calculation.
I already was thinking about something like this:
$d1 = mktime(0,0,0,date('m'),1,date('Y'));
$d2 = mktime(0,0,0,date('m')+1,1,date('Y'));
$days = (($d2-$d1) / (24 * 3600));
and the rest I'm still thinking off :)
thx!
- Next message: Jeroen: "Re: Date code"
- Previous message: Tim Van Wassenhove: "Re: Date code"
- In reply to: Jerry Gitomer: "Re: Date code"
- Next in thread: Tim Van Wassenhove: "Re: Date code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|