In some threads I saw People using "Calendar.info(...)" but nothing like this can be found in the documentation.
What is the easiest way to show the date without deriving year, month and day from the timestamp ?
Thanks
using Toybox.Time.Gregorian as Calendar;
var now = Time.now();
var time = Calendar.info(now, Time.FORMAT_SHORT);
str=hour.format("%d")+":"+time.min.format("%02d")+":"+time.sec.format("%02d")+AMPM;
Sys.getDeviceSettings().is24Hour
if false:
hour%12, and if hour is then 0, make it 12
if the original hour>=12 it's PM