Date plus and minus 1 day

I think it might a problem with Boolean Logic of conditions.
Try this for february:
$#DM#=1||#DM#=2&&(#Dd#-1)=0?31:0$
$#DM#=1||#DM#=2&&(#Dd#-1)=0?100:0$

If it won’t work we will need to create even more elements.

1 Like

OK thanks, is this layer 6?

1 Like

No, number 2.
From:

into

1 Like

OK, so put: $#DM#=1||#DM#=2&&(#Dd#-1)=0?31:0$$#DM#=1||#DM#=2&&(#Dd#-1)=0?100:0$ in to layer 2 TEXT setting now there’s a latent 0 from the 2nd to 28th Feb

1 Like

No, you put $#DM#=1||#DM#=2&&(#Dd#-1)=0?31:0$ into text and $#DM#=1||#DM#=2&&(#Dd#-1)=0?100:0$ into transparency, that was just the way Facer forum shows quotes.

1 Like

Thanks, I should have looked more carefully expression was twice as long and had two $$ in the middle.

It worked! nice one

1 Like

I wish I did but I don’t know how to apply it to the other 7 layers

1 Like

Ok, if that works here are all the layers again:

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

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

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

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

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

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

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

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

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

Let me know what works.

1 Like

Hi Mellin, following dates still have latent numbers jan 31, may 31, Aug 31, Dec 30

1 Like

So you’re telling me that when we have jan 1, may 1, Aug 1, or Dec 1, the -1 field shows respectively 31, 31, 31 and 30.
Am I right?

1 Like

No when I select the 2nd day of those months there is a 31, 31, 31 and 30, I’m selecting the dates from the calendar in creator I’ve got all layers as viewable

1 Like

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