Ok, so I'm working on a new time tracking system for work. We're paid bi-weekly, and this time instead of having the system enter the pay periods into the database "on the fly", I'm going to just enter 30 years worth of them all at once. Makes things simpler.
But in doing this I stumbled onto something probably most math majors know about, but which I had never encountered before:
26 pay periods x 14 days = 364 days
So where does that damned extra day go? Are we all getting gypped somehow? This is such a common thing I can't help but think it must be in a computer programming textbook somewhere. Anyone ever come across this? What's the answer?
3:45 pm, Update: Solved it. The trick was not to look at the pay periods, but to look at the fiscal years to which they belonged. To wit:
So, the solution is to keep an eye out on the pay period dates. When the start and end date of the first pay period of a new fiscal year are completely inside the second quarter, then assign that pay period to the previous year and assign the next pay period to the "new" one.
Effectively, every 14 years a fiscal year will come along with 27 pay periods in it instead of 26. A google search reveals this to in fact be the case. Sort of like an old mechanical typewriter whose bell "rings" after fourteen key presses.
Sometimes this job seems to be nothing more than the computer helpdesk equivalent of wiping grownup's bottoms (true, it doesn't smell as bad, but it's a lot more frustrating). But, every once in awhile, it's really cool.
Here's what I'm thinking:
Except for those places with annoying bimonthly or monthly pay periods, generally you get paid every two weeks. No, there aren't an even number of 2-week pay periods in a year.
Say the first pay period starts on Jan. 1st. After 26 pay periods that year, you'd put Dec. 31st (or 30&31 if a leap year) in with the first 13 (12) days of the second year. So every several years you end 27 pay periods and pray it doesn't bump you into the next tax bracket :)
I'm not sure if that helps with the algorithm writing, but I guess you could redefine a year to 364 days. It might be the same sort of exception to the standard date progression that you'd have to put in for a leap year?
Posted by: Sherri on May 27, 2004 02:18 PMWe are used to thinking of a year as 365 days however this is only approximately correct.
A year is actually defined as the time it takes for the earth to complete one orbit around the sun. The smaller the increment of time in which this is expressed (i.e, measured), the more accurate will be the representation. The fact is that a day (which is defined as the time it takes for the earth to make one revolution on it's axis) is too rough a measure, so that a year cannot be expressed as a whole number measured in days (or in weeks - which are themselves defined as 7 "whole" days). The year can only be expressed (as whole units) in months, and this is made possible (i.e., forced) because the actual time for each month is different (i.e., the arithmetic remainder is divided up and spread over the individual months) and an adjustment is made every four years for February. So that measured in pay periods (as your pay periods are multiples of days), the year is approximated as 26 and 1/14th pay periods. The fact is that a year is not 52 weeks, but 52 whole weeks and 1/7th of a week (approximately, on average). In the same sense, we are used to thinking that a year is 365 days, but actually it is approximately 365 and 1/4 days (where the 1/4 day which is subtracted each year, is added back as a whole day every four years). All of this is done and has been done historically to allow man to think in terms of days, and to enable the seasons to be fixed to the calendar (which of course this whole system defines). Anyway if all this is not completley correct, it is approximately correct.
Posted by: nicholas on May 27, 2004 03:46 PMScott,
Jeff called me at work about this around 1415 and I explained to him that the extra day is in the next year's first two weeks or the previous year's last two weeks. Taking into account the leap year every four years, there is an extra pay period every 10 years. Working in the government service, getting paid every two weeks for over 14 years, I've seen it twice. Pretty cool, but Uncle Sam still gets his cut. It's a wonder Jeff didn't note it back to you before I got home to tell you that.
If you get paid weekly it is called weekly.
If you get paid 24 times a year is it called BI Monthly or Bi Weekly?
What is it called if you get paid 26 times a year?
Here in Alabama, 26 pay periods is called "bi-weekly," and 24 pay periods is called "semi-monthly." I know this only because we're in the middle of a shift from a bi-weekly to a semi-monthly pay system.
Posted by: Tatterdemalian on May 10, 2005 06:26 PMI work for a school district and we are in the middle of very angry employees not understanding why this year they will see a decrease in their bi-weekly pay due to this being a 27 pay year. Is there ANY WAY to explain it or in fact do you lose money in a 27 pay year???
Posted by: Jen Grove on June 15, 2005 03:07 PM