Greetings,
I copied some HTML and javascript code from the internet to create a webpage that shows current weather conditions on an old Android tablet that I have hanging on the wall. I'm using the webtags feature of CumulusMX to pull data from the weather station and input it into the webpage along with some javascript that is used to "color code" the temperature data according to the current temperature. I tried to add the #sunrise and #sunset webtags but the webtags are in 24 hour format. Does anyone know of some javascript to convert the 24 hour time into 12 hour (AM, PM)? I'm assuming that I need javascript because that is what the other scripts I copied are using.
Currently, the #sunrise webtag gives me 07:25 and the #sunset webtag gives me 19:49. I would like to show these as 7:25 AM (dropping the preceding zero and adding AM) and 7:49 PM (converting the 24 hour time to 12 hour and adding the PM).
Any help here is certainly appreciated.