TimeOfDayString extension

Context-FREE extensions – work anywhere!

on

Methods

to12HourString({bool includeSpace = true}) String

Available on TimeOfDay, provided by the TimeOfDayString extension

Returns "2:30 PM" style – 12-hour with AM/PM (you choose the style)
toHHmm() String

Available on TimeOfDay, provided by the TimeOfDayString extension

Returns "14:30" – always 24-hour, zero-padded (perfect for storage, sorting, JSON)