[SERVER-15356] Aggregation should Use ISO-8601 for Date Formating Created: 21/Sep/14 Updated: 06/Dec/22 Resolved: 11/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Gordon Myers | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | usability | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query
|
| Participants: |
| Description |
|
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! |
| Comments |
| Comment by Charlie Swanson [ 11/Mar/16 ] |
|
I'm closing this as a duplicate of |