Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15356

Aggregation should Use ISO-8601 for Date Formating

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
    • Query

      Why doesn't Mongo use the ISO-8601 standard for formatting dates? This affects both the $week and $dayOfWeek operators. It's very frustrating to have to hack in a bunch of $if operators to make Mongo conform to the only real standard for dates in popular usage.

      Right now Mongo returns $dayOfWeek as 1 = Sunday and 7 = Saturday, but the ISO-8601 standard is 1 = Monday and 7 = Sunday.

      And now Mongo uses the %U operator from C, when you should use the %V operator as this is the universal standard.

      The world has moved to ISO-8601. MongoDB should catch up!

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            soapergem Gordon Myers
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: