Pay Date Generator

Greetings Helpful Ones!

I’m trying to write a php script which generates the paydates for a bi-weekly paycheck schedule.

The first date would be August 17th, and the script can go on as far as April of next year. I’m guessing I would use a for statement.

At the end I just need to echo the dates with a
in the MM/DD/YYYY format:

08/17/2007

Can anyone give me a hand in doing this? Thanks!

the mktime funczin has a nice feature. it will exapt dates that are out of range. e.g. the 32. of January will automatically be the 1. of February.

[php]echo data(‘Y/m/d’,mktime(12,0,0,8,17+$i*7,2007)).’
’;[/php]

http://php.net/date
http://php.net/mktime

Sponsor our Newsletter | Privacy Policy | Terms of Service