Hello, everyone,
who can help me?
The following…
I want to display an object (sharp lawer) or text at a specific time!
For example, from 3:00 p.m. to 3:59 p.m. and/or from 4:00 a.m. to 4:59 a.m. in yellow and outside these times in white.
(I probably need to create 2 objects, one in white and one in yellow)
This formula only shows only the full hour: $#Dm#==0?100:0$
Your easiest way is to use two layers like you have mentioned. Put the white one on the bottom with 100% opacity. Take the yellow top layer and use $#DH#==4||#DH#==15?100:0$ in the opacity box and it should work just like you want. The expression is written in 24-hour time (0-23) so if you want to change the times just remember to add 12 to the afternoon 12-hour time so it will work correctly.
Sorry, I have to ask to make clear what time(s) you actually want that component to be visible. Only for one minute on sunset and one minute on sunrise, or during the whole time while the sun is down?
Please excuse me for not expressing it correctly.
It is supposed to display the phases of the moon constantly from sunset to sunrise!
eg:
18:34 (sunset) to 6:34 (sunrise) = always visible
6:34 (sunrise) to 18:34 (sunset) = Not visible.
Since the opacity of moophase element cant be adjusted, you can shift it out of the screen during the day with formula like this in the X coordinate field: $(#WRH#*60+#WRm#)<(#DH#*60+#Dm#)&&(#DH#*60+#Dm#)<(#WSH#*60+#WSm#)?1000:160$
To enhance your confusion, you may want to look at this topic.
Since the moon and weather have no adjustable visibility, I took a detour here.
The moon slowly dims with the sunrise.
There is an image above it, in which the visibility is controlled.
The code for this: ((clamp(30-#WSUNRISEH#*60-#WSUNRISEM#+#DH#*60+#Dm#,0,60)-clamp(30-#WSH#*60-#WSM#+#DH#*60 +#Dm#,0,60))*70/60)
With the weather, it switches hard from day to night.
There it is controlled by the size.
The code for this:
Night: $#DISDAYTIME#=true? 0:320$
Day: $#DISDAYTIME#=true? 320:0$
All codes here come from the community and were only adapted by me.
Small note …
I’ve noticed that this preview, as can be seen here, often displays “disdaytime” incorrectly.
This works flawlessly in the creator and on the watch.