Add IsDST() function to AF Analytics
Use Case: calculating which Shift is working within a rotatingshift cycle, which must the follow Daylight Savings Time offset.
This function is available in the Performance Equation library, but not in AF. The function itself is simple once one knows it, but is not obvious (kudos to Nicola Gargano):
IsDst = Floor(Float('''1jan') / 3600) Mod 24 <> Hour('')
It should be added to the AF function library.
For more background, see this link:
1 comment

Katie Williams commented
Minor update to Nicola Gargano's original idea, if you try to put this into AF and backfill it you to another year you will get incorrect numbers. I've modified the equations slightly to account for this:
Floor(Float('*'parsetime(concat("1jan", String(year('*'))))) / 3600) Mod 24 <> Hour('*')without the "year('*')" string it will pull the current year's version of January 1st :/