I am trying to write a program to keep track of my pay. I want to
collect data every two weeks (pay period), monthly and annually. Due
to the uneven number of days in a month, always ending months on a
Saturday causes some months to be 4 weeks and some to be 5 weeks.
Does anyone have a slick way to program this such that that current
date can be placed in the correct month and year. I want the monthly
and yearly data to coincide with the pay period. (This is common
practice in many companies.) The paycheck one is easier (Subtract
the first day of the year (a Sunday) from the current date and divide
it by 14 and round up) but I'd be interested in what you may have on
this as well.