Re: All Monday's & Thursdays



"Stuart Colman" <news@N0$PAMcdfx.co.uk> wrote in message
news:44a44c0e$0$4889$fa0fcedb@xxxxxxxxxxxxxxxxx

There are a few dates missing from the list, such as Mon 5th, Thu 8th, Mon 19th and Thu
22.

I honestly do not know why his/her code does that. Then again, I could not read the code
very well. (I probably did not pay enough attention.)

Any ideas how to get these values too?

Would this work for you?

<?php
$hour = 0;
$minutes = 0;
$seconds = 0;
$month = 6; // june
$day = 1;
$temp_day = $day;
$year = 2006;
$days = array();

$curr_timestamp = mktime($hour, $minutes, $seconds, $month, $day, $year);

while($month == date('m', $curr_timestamp)) // increment timestamp when done
{
$curr_timestamp = mktime($hour, $minutes, $seconds, $month, $temp_day++, $year);

if(date('D', $curr_timestamp) == 'Mon' || date('D', $curr_timestamp) == 'Thu')
{
$days[] = date('Y M D (d)', $curr_timestamp);
print date('Y M D (d)', $curr_timestamp) . '<br />';
}
}
?>

There you have an array available with all Mondays and Thursdays, and it prints them out
by default.

You could easily make this a function, but I never bother for illustration purposes. Hope
this helps.

-Lost


.



Relevant Pages

  • Re: Announcing my new Sci-fi Book
    ... If they don't pay well, there's no surprise in not getting good ... the credit card every month, ... drunks take their clothes off is because the alcohol thins ... it will bother me enough to see the ...
    (rec.arts.sf.written)
  • Re: Nobody was listening
    ... Why bother working when I ... Start paying it back. ... pay for our own medical coverage, ... life insurance premiums. ...
    (misc.rural)
  • Re: Golden Age (John C Wright) and public good
    ... Helion's solar array must pay him for that benefit (mainly reduced ... solar flare protection required for facilities). ... to be based on what the more efficient facility would cost to build. ...
    (rec.arts.sf.written)
  • Re: New fares from 2 January 2006 - pdf
    ... >>Anyone not buying tickets often enough to bother to pay the £3 ... > If you're not bothered to pay a deposit you'll get back in as few as ... > Or bother to look at the screens on the gates. ...
    (uk.transport.london)
  • Musings of a COC about some of his convenient untruths.
    ... ...plus a couple of his "inconvenient truths". ... the turning field and probably saved a couple of my fingers. ... I'm not likely to pay over a hundred bucks for a gouge, ... I wouldn't last long enough for cancer or lung disease to ever bother ...
    (rec.crafts.woodturning)