My test was suddenly failing to check the number of days between two dates recently.
Looks like SenseTalk calculates the duration of days based on the number of seconds between two dates divided by number of seconds in a day. If two dates are not within the same daylight saving time range, the results can be a decimal number. For example,
put (date("3/11/24") - date("1/11/24")) / 1 day
returns 2.041667 instead of 2. If I compensate the lost hour due to end of DST like this,
put (date("3/11/24") - date("1/11/24") - 1 hour) / 1 day
I get the expected result 2. I can round the number to get what I want, but is there a more elegant way?