Difference between Night and Day

Hi, I was making a face the other day and was using #DISDAYTIME# to determine between day and night. I got to wondering what would we use if #DISDAYTIME# wasn’t available. I thought something around sunrise and sunset but couldn’t figure it out, and that bugs me! It’s all academic really because Facer provides an easy solution, But all the same I get to wondering…

2 Likes

There are times that the #DISDAYTIME# tag doesn’t really work well for some reason. I’ve noticed it on my watch knowing what time sunset was and the watch did not switch for 10 or more minutes using it. @russellcresser shared this and it seems to work flawlessly for me.

Daytime: $(((#DH#)*60)+#Dm#)<(((#WSH#)*60)+#WSm#)&&(((#DH#)*60)+#Dm#)>(((#WRH#)*60)+#WRm#)?100:0$

Nighttime: $(((#DH#)*60)+#Dm#)<(((#WSH#)*60)+#WSm#)&&(((#DH#)*60)+#Dm#)>(((#WRH#)*60)+#WRm#)?0:100$

As always YMMV (Your Mileage May Vary)

7 Likes

Oh wow!! I was on the wrong track completely. thank you I’ll go through it and see if my old grey cells can decipher it.

6 Likes