RE: payperiods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't know what your application or requirements are, but here's something
to think about...

If each pay period will ALWAYS be in two week increments from the date you
hard code, then you're fine just hard coding the first one and incrementing
automatically after that. However, if you're in one of those situations
where you get paid every two weeks but there is an odd number of days left
over at the end of the year and you have to pay those out in the current
calendar year, you may run into a snag. In that case, your pay period may
have to encompass 17 days or 11 days instead of the normal 14. Not sure what
your overall application is for, but I know this has crept up to bite me
once before.

Because of this, you might want to give your user(s) an input field or two
to enter a start and end date for the first pay period. After that, have the
remaining ones populate automatically based on a two-week increment and
allow the dates to be edited as required. Most of the time, the dates will
be able to be left alone. Probably only the last ending date in December
will ever have to be altered.

Maybe that's not the best option, but I think you see where I'm going with
this. I might be overthinking this, but I hated going back and changing my
system. Just trying to save you unnecessary pain and suffering.

> -----Original Message-----
> From: Anderson, Jerrad [mailto:jerrad.anderson@teds.com]
> Sent: Tuesday, November 12, 2002 1:58 PM
> To: Darren Bentley; php-db@lists.php.net
> Subject: RE:  payperiods
> 
> 
> I would think that the hard coded date is the way I'd do that.
> 
> maybe not neccessarily a start_dt, but maybe a pay_pd_st 
> date. This date is just the date the payperiod falls on. You 
> increment it once every two weeks. Have a table in your db 
> with that field and variable. maybe hardcode the very first 
> date. and a pay period date. 
> 
> if on linux or unix you can run a cron job to increment that 
> date, or do some calculation to the hardcoded date when 
> displaying a calendar.
> 
> hmm... i'm rambling..
> 
> -----Original Message-----
> From: Darren Bentley [mailto:darren@bcgroup.net]
> Sent: Tuesday, November 12, 2002 1:51 PM
> To: php-db@lists.php.net
> Subject:  payperiods
> 
> 
> 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
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux