Is it Daylight Savings?

Here’s an AMPscript snippet to determine if a date falls in the Daylight Savings period as defined by NIST.gov:

Output:
dateToCheck: 2023-10-25
month: 10
day: 25
dayOfWeekToFind: Wed
dayOfWeekNum: 4
prevSunday:
isDST: 1

Try it yourself with multiple dates: https://mcsnippets.herokuapp.com/s/6tGSENDB

NOTE: this doesn’t handle times, but could be expanded to do so.

(Visited 26 times, 1 visits today)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments