Re: Date code

From: Jeroen (info_at_nospam.be-be-hosted)
Date: 10/23/03


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!



Relevant Pages

  • Re: Question about installations
    ... Thx for your input. ... have done in my code was increased the array size from 60,000 to 200,000. ... My question is does the customer have to uninstall the ... >> exe code and do a reinstall of the new code or can I just send him the ...
    (microsoft.public.vb.general.discussion)
  • Re: [DUA] Binary data
    ... ah thx. ... >> Registry values of type binary need to be entered as an array of bytes. ... >> Size parameter should specify the number of elements in the array. ... but I can't figure out the exact correct syntax. ...
    (microsoft.public.windowsxp.embedded)
  • Re: [PHP] store array into session variable and get it back later
    ... thx. ... object of class CBreadcrumb. ... Which AFAIK isn't supported. ...
    (php.general)
  • Re: spaces in html selects
    ... My html page also contains a with names, ... An OnChange event passes the selectvalue to a function which iterates ... over the array in search of the selectvalue. ... thx for any help ...
    (comp.lang.javascript)
  • Re: array of TEdit as a constant
    ... and you should really use this to populate an array so you ... thx, this works fine. ... the names of the edit fields, because the names of my edits are not ...
    (alt.comp.lang.borland-delphi)