Date plus and minus 1 day

So if I’m reading this one right, there are 14 elements for the calendar date (only the minus 1 day)?

1 Like

The current and the “+1” are so easy, that they can use just one code, so yes.

1 Like

My plus one is surprisingly causing me the issue. for some reason I keep getting a ‘0’.

It works on the view, but not when syncing to my Huawei. Can you test on another device and see what happens for you?

1 Like

I also get 3x “0” on Sony SWR50.
Try using a singe “=” mark.

1 Like

I updated it and still get 0’s on my phone, but not the app. I may blow out the 5 number design and go with the 3-version you made.

1 Like

Try experimenting with the condition.
Put something like 0 and 1 as outcomes and check if they show up correctly.
If yes you will need to work on the code inside of the condition, if not you messed up the condition itself.

1 Like

It’s strange though that both the creator and mobile app display things correctly.

1 Like

try to use the below expression for previous day

(#Dd#-1=0?#DM#=1||#DM#=2||#DM#=4||#DM#=6||#DM#=9||#DM#=11?31:#DM#=3?#Dy#%4=0?29:28:30:#Dd#-1)

it will cover for leap year also. My watchface is not fully ready. once its ready, i will share the link

1 Like

Did you checked that on actual watches and if yes then on how many?

Using condition inside of conditions and more than 2 questions inside of one condition often brake Facer’s faces.

1 Like

Sorry @Mellin,

You are correct. when i tried in watch, it was NOT working as expected. so i changed my watchface.

1 Like

If you are looking for a working solution to do that, check this topic: Date plus and minus 1 day

1 Like

Sorry to hijack this topic, but i am looking for a solution that looks like this.

I all new to making faces.

I want to get the precious month in number (#DdL#-2), it works fine from 12 to 3, but then i get the (-).
I tryed to work and change the code you provied in days, but i don’t understand the “LAYERS” that is mentions.
How is layers made ?

Regards
Brian

1 Like

Layers are visible on the left side of the editor.
If one layer is above another then the lower layer will be obstructed in some way by the top layer.

About the months:
I guess you get numbers from -2 to 10
The easiest way would be to make that number repeat in periods of 12:
(((x/12)-(floor(x/12)))*12)

1 Like

Thanks alot,

The layer part was very oblivious, i just couldn’t get that you should make 9 Time (layers) to get one time. :slight_smile:

Your code, is working perfectly, thanks alot.

2 Likes

Here another way for the leap year with one layer …

in text:
$(round((#Dyy#)/4))=(#Dyy#/4)?29:28$

in transparency:
$#DM#=3&&(#Dd#-1)=0?50:0$

Cheers

1 Like

Day-1
In 5 layers, with leading zero: (leap year support)

1: default (right-justify, default x-position)
(#Dd#-1)
$#Dd#!=1?100:0$

2: leading zero (adjust x-position)
0
$(#Dd#>1&&#Dd#<11)?100:0$

3: #DM#-1: Jan, Mar, May, Jul. Aug, Oct, Dec
31
$(#DM#=1||#DM#=2||#DM#=4||#DM#=6||#DM#=8||#DM#=9||#DM#=11)&&#Dd#=1?100:0$

4: #DM#-1: Feb
$#DD#=60?28:29$
$#DM#=3&&#Dd#=1?100:0$

5: #DM#-1: Apr, Jun, Sep, Nov
30
$(#DM#=5||#DM#=7||#DM#=10||#DM#=12)&&#Dd#=1?100:0$

Month-1
in words (month, short name)

$(#DM#+13)%12=1?Jan:$$(#DM#+13)%12=2?Feb:$$(#DM#+13)%12=3?Mar:$$(#DM#+13)%12=4?Apr:$$(#DM#+13)%12=5?May:$$(#DM#+13)%12=6?Jun:$$(#DM#+13)%12=7?Jul:$$(#DM#+13)%12=8?Aug:$$(#DM#+13)%12=9?Sep:$$(#DM#+13)%12=10?Oct:$$(#DM#+13)%12=11?Nov:$$(#DM#+13)%12=12?Dec:$

numeric
In 2 layers, with leading zero:

1: default (right-justify, default x-position)

((#DM#+13)%12)
100

2: leading zero (adjust x-position)

0
$(#DM#+13)%12<10?100:0$

Month+1
in words (month, short name)

$(#DM#+1)%12=1?Jan:$$(#DM#+1)%12=2?Feb:$$(#DM#+1)%12=3?Mar:$$(#DM#+1)%12=4?Apr:$$(#DM#+1)%12=5?May:$$(#DM#+1)%12=6?Jun:$$(#DM#+1)%12=7?Jul:$$(#DM#+1)%12=8?Aug:$$(#DM#+1)%12=9?Sep:$$(#DM#+1)%12=10?Oct:$$(#DM#+1)%12=11?Nov:$$(#DM#+1)%12=12?Dec:$

numeric
In 2 layers, with leading zero:

1: default (right-justify, default x-position)

((#DM#+1)%12)
100

2: leading zero (adjust x-position)

0
$(#DM#+1)%12<10?100:0$

I used the following for day-1, day, day+1 (3 text layers each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Dd#-1):$$#Dd#=1?31:$$#Dd#>10?(#DdL#-1):$
#DdL#
$#Dd#>0&&#Dd#<9?0(#Dd#+1):$$#Dd#=31?01:$$#Dd#>10?(#DdL#+1):$
$#DM#=1||#DM#=8?100:0$

2 Likes

I realised the above was absurd but will leave it up to demonstrate what overthinking on an idle mind can do.
I have reduced the elements to the following:

DayNum
#DdL#
100

DayNum+1
$#Dd#>0&&#Dd#<9?0(#Dd#+1):$$#Dd#=#DIM#?01:#DdL#+1$
100

FebAprJunSepNov-1
$#Dd#>1&&#Dd#<11?0(#Dd#-1):$$#Dd#=1?31:$$#Dd#>10?(#DdL#-1):$
$#DIM#=28||#DIM#=29||#DIM#=30?100:0$

MarLeap-1
$#Dd#>1&&#Dd#<11?0(#Dd#-1):$$#Dd#=1?29:$$#Dd#>10?(#DdL#-1):$
$#DM#=3&&(#Dy#%100)!=0&&(#Dy#%4)=0?100:0$

Mar!Leap-1
$#Dd#>1&&#Dd#<11?0(#Dd#-1):$$#Dd#=1?28:$$#Dd#>10?(#DdL#-1):$
$#DM#=3&&(#Dy#%4)!=0?100:0$

MayJulOctDec-1
$#Dd#>1&&#Dd#<11?0(#Dd#-1):$$#Dd#=1?30:$$#Dd#>10?(#DdL#-1):$
$#DIM#=31&&#DM#!=1&&#DM#!=8?100:0$

JanAug-1
$#Dd#>1&&#Dd#<11?0(#Dd#-1):$$#Dd#=1?31:$$#Dd#>10?(#DdL#-1):$
$#DM#=1||#DM#=8?100:0$

2 Likes

There are alot of different ways to calculate Day +/- n days.
This is the version I use

Day Formula
Day +7 $(#Dd#+7)<=#DIM#?(#Dd#+7):(#Dd#+7-#DIM#)$
Day +6 $(#Dd#+6)<=#DIM#?(#Dd#+6):(#Dd#+6-#DIM#)$
Day +5 $(#Dd#+5)<=#DIM#?(#Dd#+5):(#Dd#+5-#DIM#)$
Day +4 $(#Dd#+4)<=#DIM#?(#Dd#+4):(#Dd#+4-#DIM#)$
Day +3 $(#Dd#+3)<=#DIM#?(#Dd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DM#==9&&(#Dd#-7)<1?(31-7+#Dd#):$$#DM#==10&&(#Dd#-7)<1?(30-7+#Dd#):$$#DM#==11&&(#Dd#-7)<1?(31-7+#Dd#):$$#DM#==12&&(#Dd#-7)<1?(30-7+#Dd#):(#Dd#-7)$)/1)

These formulas are used in the TEXT layer property in my Skyline watchfaces. Unfortunately you do end up with lots of layers to account for the all of the date values. But it does pass the time!
Example below:

4 Likes