dateToString produces incorrect year/week numbers

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 6.0.15
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • Hide

      create an aggregation with a simple projection:

      {
        "FIRST_YEAR_WEEK": { $dateToString: { date: { $dateFromParts: { isoWeekYear: 2020, isoWeek: 1, isoDayOfWeek: 1 } }, format: "%Y-%V" } }
      }
      Show
      create an aggregation with a simple projection: { "FIRST_YEAR_WEEK" : { $dateToString: { date: { $dateFromParts: { isoWeekYear: 2020, isoWeek: 1, isoDayOfWeek: 1 } }, format: "%Y-%V" } } }
    • QE 2024-06-10
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      { $dateToString: { date: { $dateFromParts: { isoWeekYear: 2020, isoWeek: 1, isoDayOfWeek: 1 } }, format: "%Y-%V" } }

      this produces `2019-1` where this should be either `2019-52` or `2020-1` 

              Assignee:
              Serhii Lysenko
              Reporter:
              Andre Haverdings
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: