12 Hour Time Format

  • 1
  • Question
  • Updated 2 years ago
I am pulling astronomy data (specifically sunrise and sunset) from WU and want it to come in as 12 hour time format as opposed to the default 24 hour time. Is this possible?
As I don't know a lot about what I am doing/using, here is how I am getting the data
api.wunderground.com/api/XXXXXXXX/conditions/astronomy/hourly10day/forecast10day/lang:EN/q/00.000000,-00.00000.json
URL was modified a bit. 
With this call, i get the following data (very small snippet). Is it possible to pull in the sunset time as 12 hour time? Thanks!
, "moon_phase": {
		"percentIlluminated":"14",
		"ageOfMoon":"26",
		"phaseofMoon":"Waning Crescent",
		"hemisphere":"North",
		"current_time": {
		"hour":"12",
		"minute":"22"
		},
		"sunrise": {
		"hour":"7",
		"minute":"13"
		},
		"sunset": {
		"hour":"17",
		"minute":"46"
		},
		"moonrise": {
		"hour":"3",
		"minute":"05"
		},
		"moonset": {
		"hour":"16",
		"minute":"07"
		}
Photo of Jeff Furbush

Jeff Furbush

  • 1 Post
  • 0 Reply Likes

Posted 2 years ago

  • 1

Be the first to post a reply!