Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 597463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:17:01+00:00 2026-05-13T16:17:01+00:00

I recently came across a big problem, as I have a system that’s paying

  • 0

I recently came across a big problem, as I have a system that’s paying the customers weekly.

As we all know, a year has 52 weeks, and there are standards for it. I’m using PHP aka date(‘W’) to get the week number from a date, that calculates that according to the standard ISO-8601.

Here are some references:

  • http://www.iso.org/iso/date_and_time_format and
  • http://en.wikipedia.org/wiki/ISO_week_date

But here’s the ISSUE: year 2009 has 53 weeks. It seems that through the Gregorian calendar within 400 years there are 71 years that have 53 weeks. That’s one thing I didn’t know, and probably many didn’t as well.

According to Wikipedia:

2009-12-31 is 2009-W53-4 (ISO year 2009 has 53 weeks, extending the Gregorian year 2009, which starts and ends with Thursday, at both ends with three days).

and the date function in PHP totally respects it.

If you look into MS Outlook, and show day of the week in the calendar view, it will appear 52 weeks
considering 28 DEC 2009 to 03 JAN 2010 week 1. Is this another standard? The US standard or something?

If so, then why PHP can’t support it? Did anyone make a function that supported this?

Is it correct to have 53 weeks? We have both European and US clients.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:17:01+00:00Added an answer on May 13, 2026 at 4:17 pm

    I don’t think you will have an issue here. Fact is you are following an international standard for date and time formatting and counting (ISO8601). If you have any customers that complain, simply refer them to the standard.

    Outlook’s week numbering is somewhat equivalent to the following:

    $dummyWeek = floor((date('z') + (date('N') - 1)) / 7) + 1;
    

    For billing purposes, you are better off using ISO8601 as a standard. In fact, if you look at your taxes that you are going to fill this year, they will describe the last fiscal year as being 53 weeks long.

    The problem with the Outlook way of counting is that a week is not guaranteed to be 7 days. For example, OW01-2010 is compromised of only 2 days: Fri Jan 1, Sat Jan 2. That’s an awfully short billing period for a week.

    ISO8601 weeks are guaranteed to be 7 days long which is why we need a leap-week every 4/5/6 years.

    Which one of those options would you prefer:

    • ISO8601: Having 53 weeks once in a while, but every single one of them is 7 days long.
    • Outlook: Having 52/53 weeks in a year at random, but having to pay twice a year for an “half-week”.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently came across Flex builder and it was gr8 to know that it
I recently came across a Windows library called AHK that gives me great control
I recently came across some Java code that simply put some strings into a
I recently came across a CSS pseudo class that can do an effect for
I recently came across a server that's sending a Location header (for a redirect)
I recently came across a problem with My.Computer.FileSystem.DeleteDirectory() . It will not delete read
I recently came across some weird looking class that had three constructors: class Class
I recently came across classes that use a configuration object instead of the usual
I recently came across the problem of printing 4219 lines on console. but when
I recently came across a bit of not-well-tested legacy code for writing data that's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.