DateTimeDiff returning negative numbers in Architect Data Action

Running into a weird edge case with date math in a Data Action. I’ve got a flow that needs to check if a ticket was created more than 3 days ago. Seems simple enough. I’m using DateTimeDiff to compare {{contact.attributes.createdDate}} against {{flow.startDateTime}}.

Here’s the expression:

"expression": "DateTimeDiff('{{contact.attributes.createdDate}}', '{{flow.startDateTime}}', 'Days')"

The issue is the result. Sometimes it returns -4, sometimes 3. I assumed DateTimeDiff always returns the absolute difference, but looking at the docs (and trial and error), it seems to return a signed integer based on which date is earlier.

So my condition {{data.diff}} > 3 fails when the difference is -4. I tried wrapping it in Abs(), but Architect expressions don’t seem to support that function. Is there a cleaner way to get the absolute value without writing a bunch of nested If statements to swap the arguments? Or am I just stuck with If(Date1 > Date2, Date1 - Date2, Date2 - Date1) logic inside the expression string?

Also, GetDayOfWeek is giving me similar headaches. It returns 1 for Sunday in some contexts and 0 in others depending on the locale setting of the organization. Ugh. Just want a reliable way to compare days without hardcoding offsets.