Thanksgiving Dates

Thanksgiving Dates

Date

dateAdd(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years"), if(day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")) <= 4, 4 - day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")), if(day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")) == 5, 6, 5)), "days")
Uses November 22, 0001’s timestamp (-6.2107516725e+13) as the base date, adds the selected number of years minus 1, and then the additional number of days based on where the 22nd falls in the week of that year.
Uses November 22, 0001’s timestamp (-6.2107516725e+13) as the base date, adds the selected number of years minus 1, and then the additional number of days based on where the 22nd falls in the week of that year.

Formatted

if(empty(prop("Year")), "", "Thanksgiving" + if(prop("Date") > now(), " will be on", " was on") + formatDate(prop("Date"), " [the] Do [of] MMMM"))

Combined

if(empty(prop("Year")), "", "Thanksgiving" + if(dateAdd(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years"), if(day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")) <= 4, 4 - day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")), if(day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")) == 5, 6, 5)), "days") > now(), " will be on", " was on") + formatDate(dateAdd(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years"), if(day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")) <= 4, 4 - day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")), if(day(dateAdd(fromTimestamp(-6.2107516725e+13), toNumber(prop("Year")) - 1, "years")) == 5, 6, 5)), "days"), " [the] Do [of] MMMM"))