Help to detect date format (day/month/year or month/day/year)

Is there any code or variable that can detect the date format used by the watch (day/month/year or month/day/year)? Some regions use one format and others the opposite.

I’ve seen people use the 12/24-hour format as a workaround, for example with opacity tags like:
$#DTIMEFORMAT#==12?100:0$ for 12h (MM/DD/YY) and
$#DTIMEFORMAT#==24?100:0$ for 24h (DD/MM/YY).
It works for some users, but it’s not really a definitive solution.

Is there any cleaner or more stable way to handle this?

2 Likes

No, there isn’t.
This what I do. I use the opacity field to differentiate the user setting if metric or imperial. Why in the opacity field because I want the format DD-MM for metric and MM-DD for imperial. Because the “-” would act as an operand when using a condition.

So the 2 elements:
Metric
text:#Dd#-#DMM#
Opacity: $#UNITSYS#=METRIC?100:0$

Imperial:
text: #DMM#-#Dd#
opacity: $#UNITSYS#=IMPERIAL?100:0$

If you want just 1 element, then this would work (without using -, or / …)

$#UNITSYS#=IMPERIAL?#DMM#.#Dd#:#Dd#.#DMM#$

To note is that UNITSYS may not work on WFF. The warning message is: " Not supported in this format. Default value will be used." - Not sure what that means…

6 Likes

Brilliant!!! The same thing could be done in WFS, but with Fahrenheit and Celsius.

1 Like