-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
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!