Re: [PHP] Bi-weekly pay period

2003-02-04 Thread bob parker
On Tue, 4 Feb 2003 11:17, Sarah Heffron wrote:
> I'm writing a quick little thing to act as a time clock since people are
> writing out by hand and it's not so accurate. It's basically click a button
> to clock in and click a button to clock out.
>
> What I also want to do is create a report (well I've already created the
> report) but I want to limit it to the current pay period. Our pay periods
> are biweekly. I was trying to think of a smart way to have php figure out
> what the current pay period is and I'm having a hard time figuring out if
> this is even possible or should I just tell it a years worth of pay period
> ranges for now.
>
> I figure something like, if the week # is even, use this past Sunday as the
> start date. If the week # is odd use the Sunday of the week before. Then
> figure out what date is 2 saturdays after whatever Sunday was selected.
>
> Any assistance appreciated.
>
> Sarah

Quite commonly back in the days when I wrote the odd payroll system (not in 
php though I have one such started), we used to simply create a table with 
the start and end dates for each fortnight.

Not clever, just a gross kludge, but nothing ever went wrong with it.

It also dealt with the Australian Income Tax complications which go as 
follows:

1. Income tax for employees is levied on the wages earned in cash through the 
year, there is no account of earnings accrued through an incomplete pay 
period at the end of the financial year.

2. Every 11 years a person on fortnightly pay will have 27 pays in the year 
and consequently higher earnings for that year. The ATO require that the 
fortnightly pay as you go deductions be adjusted to take that into account.

Complicated? If bullshit was weaponry the Australian Govt would have disarmed 
Iraq alone years ago.

Bob


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




Re: [PHP] Bi-weekly pay period

2003-02-03 Thread Jason Sheets
This code will work for determining if the week is odd or even, it uses
Monday for the first day in the week as noted on

http://www.php.net/manual/en/function.date.php.



Note I just scribbled this down so you may need to adapt it but I ran it
through a quick test and it worked.

Jason

On Mon, 2003-02-03 at 17:17, Sarah Heffron wrote:
> I'm writing a quick little thing to act as a time clock since people are
> writing out by hand and it's not so accurate. It's basically click a button
> to clock in and click a button to clock out.
> 
> What I also want to do is create a report (well I've already created the
> report) but I want to limit it to the current pay period. Our pay periods
> are biweekly. I was trying to think of a smart way to have php figure out
> what the current pay period is and I'm having a hard time figuring out if
> this is even possible or should I just tell it a years worth of pay period
> ranges for now. 
> 
> I figure something like, if the week # is even, use this past Sunday as the
> start date. If the week # is odd use the Sunday of the week before. Then
> figure out what date is 2 saturdays after whatever Sunday was selected.
> 
> Any assistance appreciated.
> 
> Sarah
> 
>  
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Bi-weekly pay period

2003-02-03 Thread Sarah Heffron
I'm writing a quick little thing to act as a time clock since people are
writing out by hand and it's not so accurate. It's basically click a button
to clock in and click a button to clock out.

What I also want to do is create a report (well I've already created the
report) but I want to limit it to the current pay period. Our pay periods
are biweekly. I was trying to think of a smart way to have php figure out
what the current pay period is and I'm having a hard time figuring out if
this is even possible or should I just tell it a years worth of pay period
ranges for now. 

I figure something like, if the week # is even, use this past Sunday as the
start date. If the week # is odd use the Sunday of the week before. Then
figure out what date is 2 saturdays after whatever Sunday was selected.

Any assistance appreciated.

Sarah

 


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