I want to create an indication in an outer ring of my watch face, showing what day we have on a round year index. I tried some tags, of course #DMYR#, #DYR# and others, but somehow the hand(a dot) moves in aa weird way; e.g. it’s showing jan 1st before december 31st and stuff like this. I’m a total math newby, so I don’t understand the expressions well enough to fix this on my own.
Here it’s what I have so far. As you can see the dot is not really hitting december 17th, even though it’s set as the current date:
You need to divide #DYR# by the number of days in the year and multiply by 360 to get the rotation in degrees. $(#Dy#%4)=0?366:355$ calculates for leap year. Not 100% acurate but it’s 78 years before it will next be wrong.
I have noticed and corrected it It works perfectly in the simulator, however my Fossil Carlyle apparently doesn’t like the leap year variable and displays the dot a couple of day’s behind. I hope they’re going to fix that some day. But in principle it works.Thx so much again!
Try taking the brackets out from around `#Dy#%4’ Wear OS 2 can be fussy about brackets around conditional calculations. Sometimes it won’t work with them sometimes not without. Either seem fine in all the simulators and on Tizen faces.
I’ve noticed you are using the rotational code #DYR#, you need to use the day in year #DD# if you are dividing it by days yourselves.
However, in the editor, it seems like #DYR# is not correct. December 31 is 366 degrees so testing it there is flawed.
On my Carlyle #DYR# is correctly displaying the degrees, but I haven’t tested a leap year.
Some watches don’t like the inline conditional. Making it a conditional with 2 complete expressions might help: $(#Dy#%4)=0?((#DD#/366*360)+180):((#DD#/365*360)+180)$
You can also try no conditions at all. This is 0 or 1 depending if it is a leap year, taking all 3 rules into account: (floor(1-(#Dyyyy#%4/4))-floor(1-(#Dyyyy#%100/100))+floor(1-(#Dyyyy#%400/400)))
So your complete expression would be: (((#DD#/(365+(floor(1-(#Dyyyy#%4/4))-floor(1-(#Dyyyy#%100/100))+floor(1-(#Dyyyy#%400/400)))))*360)+180)
Extremely helpful. Thanks. I will also bear the inline conditional thing in mind in the future.
Also, great information on the leap year thing. I tend to ignore the 2nd 2 rules for simplicity as I don’t expect my faces to be around in 78 years but it’s always good to have the whole picture, and a condition free method of calculation.
Welcome to the Facer Community Felix, where you have already witnessed that there are lots of helpful people, and loads to learn (my math coding also sucks by the way ).
Totally off subject, you can Share any designs directly, instead of posting a link, simply by selecting the Share Icon anywhere you see it when creating or viewing your designs, and it will give you a link to copy ok. Then you’ll see your design like this -