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/OJ0O1fXS

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

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