I feel that this is a mathematical problem the most. My company has employees all over the country. Some parts of the company are in an “odd” cycle of payment, and some are “even”. I call the start date of this payment period a "maturity period." I need to do two things:
1) determine the payment period during which this date falls
public static DateTime getPayPeriodStartDate(DateTime givenDate, string EvenOrOdd)
{ .. }
2) get a list of payment periods between two dates:
public static List<DateTime> getPayPeriodsBetween(DateTime start, DateTime end, string EvenOrOdd)
{ .. }
I use a couple of dates as fixed standards on which to base future payment dates. Fixed standard dates for odd and even:
- Even - 01/04/09
- Odd - 01/11/09
. , , 01.04.09 01/17/09. 01/11/09 01/24/09. , . , .
, , "" . , .