Check here, it explains it quite well:
This is a countdown days to christmas day (25th december for those not sure) for leap years and non leap years:
Using the day in year tag and leap year tag are the key.
Does that give you days till the next on the 26th ?
Between 26th and 31st dec it will display negative days that have past 25th from -1 to -6. Then on 1st Jan it will again calculate number of days to 25th dec.
But if that is not desired, just hide the field if result < 0 etc.
Can’t have it all!
The Candy Cane formula stars counting on the 26th . This will work for any anniversary you care to find the day number of . Have a look it is a fabulous bit of maths .Well it is to me . Not my work . It was left somewhere on the Community as a gift . I had to tweak it as the Syntax Mods broke it but I have no memory of what I had to do . That is the problem with my Brain . Soon as the job is done I forget straight away . Just copy and Paste .
If with everything you do, explain and guide your brain there is a problem now I’m worried about mine…laughs
Se com tudo que você faz, explica e orienta seu cérebro tem algum problema agora estou preocupado com o meu…risos
My Friend if you are here you have a problem . Other People have a Life . Fortunately you don’t really need to be a Genius to have Fun . Just Enjoy .
Meu amigo, se você está aqui, você tem um problema. Outras pessoas têm uma vida. Felizmente você realmente não precisa ser um Gênio para se divertir. Apenas aproveite .
If you inspect you can play with the calendar date in time machine to see if logic works.
Looks like you can probably do it all in one field…but i like to split it into separate text fields as its easier for me to understand !
Above give weird results for me.
I believe that is the old version that used to work until Facer updated mid last year. I took out all the leap year parts and just used
$(#Dy#/4)==floor(#Dy#/4)&&#DD#<=360?360-#DD#:$ $(#Dy#/4)!=floor(#Dy#/4)&&#DD#<=359?359-#DD#:$ with opacity so it would only start showing during December.
Then I used this as a countdown until New Years
$#Dy#%4==0&&#DD#<=367?367-#DD#:$ $#Dy#%4!=0&&#DD#<=367?366-#DD#:$ Days Until (#Dyyyy#+1) and I used
$#DMM#==12&&#DdL#>25?100:0$ in opacity.
I had to cheat the system by making it less functional, but more stable.
Yep, I think its hard to do it all in one field… and alot easier to make sense of formulas if they are split into separate objects.