in reply to Re^2: Calculating Number Of Pay Periods
in thread Calculating Number Of Pay Periods

Yes. The year is 365-366 days, depending, whereas weeks are 7 days (where 52 weeks is only 364 days: not a full year). Businesses often use "work weeks", and every once in a while, there is a "leap-week", to get the calendar back in sync, so the first work week of a year re-aligns with the start of the business's fiscal or calendar year. See more at ISO_week_date and ISO_8601.

  • Comment on Re^3: Calculating Number Of Pay Periods

Replies are listed 'Best First'.
Re^4: Calculating Number Of Pay Periods
by afoken (Chancellor) on Oct 09, 2017 at 20:47 UTC

    Yes, calenders have some strange rules. Our common Gregorian calendar has a lot of legacy, e.g. the short february that has to be compensated by making other months longer. 12 months of 30 days each are obviously too short, leaving five or six days that have to be spread over the 12 months. Easy for leap years, choose every even or odd month. In non-leap years, remove the extra day from one of the months.

    J. R. R. Tolkien had different ideas for Middle-earth. The stories of Middle-earth are fictional history for our real planet, so Middle-earth calendars also work for planet earth. The Shire calendar, used by the Hobbits, splits the year into 12 months of 30 days each. The remaining five or six days are not assigned to a month, they stay outside of the months. The year is split into two halves. Each of the halves is wrapped in two day of the remaining days. The middle of the year is marked by the fifth remaining day, and in case of a leap year, the leap day is inserted afther the mid-year's day. So there are two days outside the months in winter, when the year is incremented (compare to New Year's Eve and New Year) and three or four days in summer (no equivalent). A clever trick is that the mid-year's day and the leap day are not assigned a week day. This way, only 364 days are assigned a weekday, and because 364 is a multiple of seven, each year starts with the same weekday, and therefore, every day of the year has a fixed weekday.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        The 12 x 30 might be inspired by either the French Republican Calendar (see DateTime::Calendar::FrenchRevolutionary) or its ancient model, the Egyptian calendar.

        Part of the French Revolution / French Republic was the idea do make everything measurable in decimal. A week of ten days instead of seven (thus completely decoupling the week from the phases of the moon), decimal time, and the rather successful metric system. It is interesting that - in the long run - people accepted the metric system for almost everything but date and time. The calendar is a complex beast, and it has to be, as long as it shall be coupled to astronimical year. The only reason I can see why people did not accept the system of 10n "decimal seconds" per day is that it would have required replacing all existing clocks. People all across France, Europe and many parts of the world were used to find and use different currencies and units of measurement for distances, areas, volumes, weights, and so on whenever they crossed a border or even moved from one town to another. But they all used the same system of 2x 12 hours, 60 min / h, 60 sec / min. The metric system was "just another set" of units, but the decimal time was something unusual and new. And it would have required a lot of work and money to make daytime decimal.

        It would have been the right time, and it would have made modern clocks and software handling daytime a little bit simpler. But I doubt we will change to a different clock system before we get off this planet. In that respect (and not only in that respect), A Deepness in the Sky is visionary:

        The book discusses some of the problems of trying to maintain an interstellar trading culture without access to superluminal travel or to superluminal communication. Time-measurement details provide an interesting concept in the book: the Qeng Ho measure time primarily in terms of seconds, since the notion of days, months, and years has no usefulness between various star-systems. The timekeeping system uses terms such as kiloseconds and megaseconds. The Qeng Ho's computer and timekeeping systems feature the advent of "programmer archaeologists": the Qeng Ho are packrats of computer programs and systems, retaining them over millennia, even as far back to the era of Unix programs (as implied by one passage mentioning that the fundamental time-keeping system is the Unix epoch:

        Take the Traders' method of timekeeping. The frame corrections were incredibly complex - and down at the very bottom of it was a little program that ran a counter. Second by second, the Qeng Ho counted from the instant that a human had first set foot on Old Earth's moon. But if you looked at it still more closely ... the starting instant was actually about fifteen million seconds later, the 0-second of one of Humankind's first computer operating systems.

        This massive accumulation of data implies that almost any useful program one could want already exists in the Qeng Ho fleet library, hence the need for computer archaeologists to dig up needed programs, work around their peculiarities and bugs, and assemble them into useful constructs.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^4: Calculating Number Of Pay Periods
by Anonymous Monk on Oct 09, 2017 at 13:26 UTC
    Or depending on which flavor of weirdness you like, you can use a 360-day calendar.