However if the min is 00, I get -1, anyway to wrap back to 59?
Similarly for sec 59, want the next sec to display 00 instead of 60 when using (#DsZ#+1)
In the past with WatchMaker, can do something like:
{dsz}==0 and 59 or {dsz}-1
Is there an equivalent for Facer?
First number of hours $(#DhZA#-1)>-1?(#DhZA#-1):(#DhZA#+2-1)$
Second number of hours $(#DhZB#-1)>-1?(#DhZB#-1):(#DhZB#+9)$
First number of minutes $((floor(#DUm#/10))-1)>-1?((floor(#DUm#/10))-1):((floor(#DUm#/10))+5)$
The second number of minutes $((#DUm#%10)-1)>-1?((#DUm#%10)-1):((#DUm#%10)+9)$
First number of seconds $((floor(#DUs#/10))-1)>-1?((floor(#DUs#/10))-1):((floor(#DUs#/10))+5)$
Second number of seconds $((#DUs#%10)-1)>-1?((#DUs#%10)-1):((#DUs#%10)+9)$
The next time digits
First number of hours $(#DhZA#+1)<2?(#DhZA#+1):(#DhZA#-2+1)$
Second number of hours $(#DhZB#+1)<10?(#DhZB#+1):(#DhZB#-10+1)$
First number of minutes $((floor(#DUm#/10))+1)<6?((floor(#DUm#/10))+1):((floor(#DUm#/10))-6+1)$
The second number of minutes $((#DUm#%10)+1)<10?((#DUm#%10)+1):((#DUm#%10)-10+1)$
First number of seconds $((floor(#DUs#/10))+1)<6?((floor(#DUs#/10))+1):((floor(#DUs#/10))-6+1)$
Second number of seconds $((#DUs#%10)+1)<10?((#DUs#%10)+1):((#DUs#%10)-10+1)$
Thanks lucky.andrei for the formula, will have to study yours for a bit to understand the logic
Manage to get (prev/next +/- 1) working for Hr & Min, with following:
Previous hour works using $(#Db#-1)=0?12:(#Db#-1)$
Next hour works using $(#Db#+1)=13?1:(#Db#+1)$
Previous minute work using $(#Dm#-1)=-1?59:(#Dm#-1)$
Next minute works using $(#Dm#+1)=60?0:(#Dm#+1)$
Now have to figure out: (pre/next +/-2) and (pre/next +/-3)
Special scenario:
(minute = 58,59,00,01)
(second = 58,59,00,01,02)
Can I use boolean for (#Dm#-2) as it has 2 condition: if -2 (want 58) and if -1 (want 59)
(#Ds#-3) can have -3, -2, and -1
Once I figure the previous 3 sec, the next 3 sec is similar concept
Please note that these nested conditions do not work on all watches.
Also, you are using #Db#, which is 12h or 24h based on a users preference. Your expression is made for 12h mode only, so you should use #Dh# instead.
Here is one I made for someone on the forum that asked for something similar, using modulus (with leading zeros if needed).
Inspection is enabled:
Without leading zeros it will be as simple as (well the hours are a bit complicated, but the minutes and seconds are not): (((#Dh#+10)%12)+1) ((#Dh#%12)+1)
That expression is for 12h clock, not 24h.
It would be something like
(((#Dk#+22)%24)+1)
Look in inspection mode if you want to increase the hours more than 1
Hi @michael.ding, I don’t think the hours work the way you have now.
It all depends a little what you want. I am assuming this:
You want automatic switch between 12h and 24h
You want 24h shown as 0 tot 23 (default), not 1 to 24
You don’t want leading zeros
If any of those should be different, let me know, the expressions will change.
Hours: -2: $#DTIMEFORMAT#==24?((#DH#+22)%24):(((#Dh#+10-1)%12)+1)$ -1: $#DTIMEFORMAT#==24?((#DH#+23)%24):(((#Dh#+11-1)%12)+1)$ 0: #Db# +1: $#DTIMEFORMAT#==24?((#DH#+1)%24):(((#Dh#+1-1)%12)+1)$ +2: $#DTIMEFORMAT#==24?((#DH#+2)%24):(((#Dh#+2-1)%12)+1)$