• ian.fickling (9/6/2010)


    Still not clear to me how you have resolved the week on week comparison.

    Each month has field which states how many weeks it has, this year and last (4 or 5)

    There are potentially 60 week slots (5 per month), but only 52 or 53 are used in any year.

    Each week-ending date has a month number (1-12 and decided by where Wednesday [YMMV!] falls) and week-in-month number (1-5); it is also allocated a week number in the range 1-60 (yes, there are gaps)

    It also has 'last year figure' filled with corresponding week in previous year (with 4-to-5 and 5-to-4 being pro rata)

    The system uses weekly comparisons.

    It also handles quite nicely the nasty 5-4-5 that pops up occasionally that gives the 53 week year. It also often gives quarters of 4-5-4 and 5-5-4 (giving nice month boundaries) rather than the traditional 4-4-5 (which can have a week completely in the wrong month).

    Now I just a method to adjust for Easter trading ...