Re: payperiods
| From: | Peter Beckman | Date: | Tue, 12 Nov 2002 18:56:07 +0000 |
| Subject: | Re: payperiods | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-23252@lists.php.net to get a copy of this message | ||
$nextpayperiod = mktime(0,0,0,$month,$day+14,$year);
$humanreadabledate = date("r",$nextpayperiod);
where $month is numeric month, $day is the last payperiod day (1-31), and
$year is the year of the payperiod.
$nextpayperiod will equal the unix timestamp of 14 days from the last payperiod.
Peter
On 12 Nov 2002, Darren Bentley wrote:
> Hello,
>
> I have build a php calendar and want to implement 2 week payperiods so
> staff can enter their hours worked. Then I can summarize work done per
> pay period.
>
> Any idea what the easiest way to do this is? I could hard code a
> starting date into a database, then go up 2 weeks at a time from there.
> Is there a better way?
>
> Thanks,
>
> --
> Darren Bentley / Systems Administrator
> Borealis Internet / 1-800-667-0307
> Prince George, BC, Canada
> http://www.pgweb.com
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
---------------------------------------------------------------------------
Peter Beckman Systems Engineer, Fairfax Cable Access Corporation
beckman@purplecow.com http://www.purplecow.com/
---------------------------------------------------------------------------