apseren / ap37

ap37 Launcher default script and api documentation
https://play.google.com/store/apps/details?id=com.aurhe.ap37
GNU General Public License v3.0
46 stars 16 forks source link

Printing DateTime in 12Hour format with AM/PM #10

Closed adriancs2 closed 5 years ago

adriancs2 commented 6 years ago

Can you try to figure out a way to print the datetime in 12 Hour format with (AM/PM sign) in stead of 24 Hour format? Perhaps a boolean value to identify the switch for 12H/24H? thanks.

apseren commented 5 years ago

Can be done in JavaScript with (hour < 12 || hour === 24) ? "AM" : "PM";

Also if your device does not have this bug https://bugs.chromium.org/p/chromium/issues/detail?id=520783 the standard JavaScript API can be used to get the time already formatted.