Your code works beautifully! The only issue I see is the current date reads 01-09 but the previous and next dates only read 1-9 without the leading zero.
I tried altering all your tags to #DdL# instead of #Dd# but couldn’t force it to work in the editor. My solution will be to add Opacity tags and treat it like I do adding leading zeros to my digital time displays. Here are the opacity expressions I came up with.
Opacity filters
Zero Last Date with added 0 in text box
$(#Dd#-1)<10?100:0$
Last Date (no zero)
$(#Dd#-1)>=10?100:0$
Zero Next Date with added 0 in text box
$(#Dd#+1)<10?100:0$
I don’t understand, the tag I used I picked specifically because it has no leading zero. I suppose you could remove the zero from the normal date somehow. Not at home currently or I’d look into it, I am in fact very ocd lol, so either way thanks!
So where exactly do you find that the date reads with a leading zero? As I said the tag I used, I used specifically because it wouldn’t have a leading zero, and both on my watch (Active 2), the preview simulation, and indeed the creator itself show the number just fine (no leading zero either):
Not sure where you’re seeing this?
Edit: Also, another silly thing you can do with the #DdL# tag (this is the one that shows the leading zero) is (#DdL#-0), this just like any other math equation on these tags gets rid of the leading zero. You could try that I suppose!
I normally use the leading zero date and when I tried to force your code to match it, the editor refused to work like that. I guess I didn’t make myself clear when I replied to your first post. I have a habit of my fingers getting ahead of my brain when typing. (I’ll blame my typing teacher in school for that, always trying to make us type faster without thinking about it.) The point I was trying to make was that your code would not work with the leading zero style of date even when changing all the #Dd# tags to #DdL# tags. Which would make your next date expression $(#DdL#+1)>#DIM#?1:(#DdL#+1)$ which won’t display a leading zero for some reason. I’m sorry if I didn’t make myself more clear the first time.
OH Sorry, so you wanted a leading zero xD Yeah for some reason math equations on tags with leading zeros just… get rid of the leading zeros lol, I don’t know why, but there doesn’t seem to be a very clean way around it other than, yeah, something like what you did xD
Caution: @Facer_Official should known better, but the nested conditionals with inside boolean doesn´t work for all the system and watches. So, sadly, you have to separate that beautiful formula in several layers and use transparency or position to show/hide…
@carlosfilippa – My understanding is it works for all systems as long as its used in certain fields; text field for example should be okay… but I suppose time will tell
I loved this. I actually had a watch a long time ago that had the days on a disc that rotated and it showed 2 days either side of this date.
With regard to your logic I think it could be simplified. How about something like:
If Today > 1 then Today-1; else if month = (1 or 2 or 4 or 6 or 8 or 9 or 11) then 31; else if month = 3 then (your brilliant 28th vs 29th calculation); else 30
Wouldn’t that work?
I got as far as this:
$#Dd#>1?(#Dd#-1):$$#DM#=1||#DM#=2||#DM#=4||#DM#=6||#DM#=8||#DM#=9||#DM#=11?31:$$##DM=3&&#DD#=61?29:##DM=3?28:30$
which didn’t work.
And then found there was an existing thread on it, which shows something close:
Their string for Day-1 is:
$#Dd#!=1?(#Dd#-1):$#DM#=2&&#DD#=60?28:$#DM#=2&&#DD#=61?29:$(#DM#=4||#DM#=6||#DM#=9||#DM#=11)&&#Dd#=1?30:$(#DM#=1||#DM#=3||#DM#=5||#DM#=7||#DM#=8||#DM#=10||#DM#=12)&&#Dd#=1?31:$
I’ll have to review to see where I went wrong.
I think I was pretty close, but I have to work on it.
I actually used your code and advanced it for the previous 5 days.
It got a bit messy, but maybe somebody else needs the code and doesn’t want to do it from scratch like me.
The code is working, but looks aweful (it gets worse, the more you want to go back in time).
Pls don’t judge
In case somebody can optimize it, feel free to do so