datetext() appears to increment the year if it's used December27 -December 31st

Noticed something strange when using the datetext() function on dates near the end of December.  Using datetext() on dates December 27th or later display the next year rather than the correct one.  Example below...

a!localVariables(

  local!dateDec25th: date(2021, 12, 25),
  local!dateDec27th: date(2021, 12, 27),

  {
    dateDec25th: local!dateDec25th,
    dateText25th: datetext(local!dateDec25th, "M/d/YYYY"),
    gmtThe25th: datetext(gmt(local!dateDec25th), "M/d/YYYY"),
    a: "********",
    dateDec27th: local!dateDec27th,
    dateText27th: datetext(local!dateDec27th, "M/d/YYYY"),
    gmtThe27th: datetext(gmt(local!dateDec27th), "M/d/YYYY"),
    aa: "********",
    toDate25th: todate(local!dateDec25th),
    toDate27th: todate(local!dateDec27th),
    gmt: todate(gmt(local!dateDec27th))

  }

  /**** 
  The above returns...

  dateDec25th:  12/25/2021(Date)
  dateText25th: "12/25/2021"(Text)
  "********"
  dateDec27th:  12/27/2021(Date)
  dateText27th: "12/26/2022"(Text)
  "********"
  toDate25th: 12/25/2021(Date with Timezone)
  toDate27th: 12/27/2021(Date with Timezone)

  ****/

)

Am I using the datetext() function incorrectly?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data