Closed garrettjstevens closed 3 years ago
Thank you very much! These are great fixes that should fix the issue one user had.
2023 is not so far away. This is what I have done. I hope it will work ;-) 2023-age.txt 2023-phase.txt Adjustments for 2023.txt
thanks again MAlfare!
Fixes #1
%j
and%H
return 0-padded numbers, for example "001" for Jan. 1 or "09" for 9 am. Bash arithmetic interprets numbers that start with a0
as octal numbers, though, which can lead to unexpected results. For example,$((024))
evaluates to20
, and$((09))
throws an error since that is not a valid octal number. Adding the10#
here forces it to evaluate it as a base 10 number, which should give the expected results.--utc
to thedate
calls so that you get the same result no matter your local timezone (and it should match what the Dial-A-Moon expects more accurately).$num
to create the$im
variable so it doesn't have to get calculated again.This is a fun idea for a desktop background, thanks for making it!