On Sat, 23 Sep 2023 19:22:52 -0400
Felix Miata <mrma...@earthlink.net> wrote:

> It's still that idiotic AM/PM nonsense, and the : is in the wrong
> place.

Yup. I think it's locale-dependent, as you surmised.


# Optional: Insert a colon between hours and minutes. AM/PM times
# assumed.
SunriseTime="${SunriseTime:0:1}:${SunriseTime:1}"
SunsetTime="${SunsetTime:0:1}:${SunsetTime:1}"

echo "Sunrise Today:" "$SunriseTime" AM
echo "Sunset Today:" "$SunsetTime" PM

But I concur with Mr. Wooledge, this is hardly ideal.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Reply via email to