Date plus and minus 1 day

Then we will have to create even more layers:

first element:
(#Dd#-1)
$(#Dd#-1)=0?0:100$

2:
31
$#DM#=1&&(#Dd#-1)=0?100:0$

3:
31
$#DM#=2&&(#Dd#-1)=0?100:0$

4:
31
$#DM#=4&&(#Dd#-1)=0?100:0$

5:
31
$#DM#=6&&(#Dd#-1)=0?100:0$

6:
31
$#DM#=9&&(#Dd#-1)=0?100:0$

7:
31
$#DM#=8&&(#Dd#-1)=0?100:0$

8:
31
$(#Dd#-1)=0&&#DM#=11?100:0$

9 (end of February for a Leap year)
29
$(#Dd#-1)=0&&#DM#=3&&#DD#=61?100:0$

10 (end of February for a non Leap year):
28
$(#Dd#-1)=0&&#DM#=3&&#DD#=60?100:0$

11:
30
$#DM#=7&&(#Dd#-1)=0?100:0$

12:
30
$#DM#=5&&(#Dd#-1)=0?100:0$

13:
30
$#DM#=10&&(#Dd#-1)=0?100:0$

14:
30
$#DM#=12&&(#Dd#-1)=0?100:0$

3 Likes

Hi Mellin, sorry I’m confused by these is first one (first element) TEXT followed by TRANSPARENCY and are all the others TEXT? and if so what goes in TRANSPARENCY?

1 Like

Example:

3: - layer number
31 - text
$#DM#=2&&(#Dd#-1)=0?100:0$ - transparency code

The less codes the better.

1 Like

Thank you for clarification, I’ll insert and feedback agree about ‘Parameter Parsimony’

1 Like

Thanks @Mellin, works perfectly, thanks again for all your help with this , code will be really useful in the future. Hope you don’t mind I gave you credit for the code in the description of my watch face, if it’s a problem let me know and I’ll change it, cheers Hayden

2 Likes

It’s not a problem.
It would be stupid to not take free advertising from another premium designer, but remember that you don’t have to do that.

1 Like

Your help is invaluable, it’s the least I can do, cheers

3 Likes

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