Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TimeFormat.h File Reference

Enumerations

enum  TIME_FORMAT {
  TIME_FORMAT_GUESS = 0 , TIME_FORMAT_SS = 1 , TIME_FORMAT_MM = 2 , TIME_FORMAT_MM_SS = 3 ,
  TIME_FORMAT_HH = 4 , TIME_FORMAT_HH_SS = 5 , TIME_FORMAT_HH_MM = 6 , TIME_FORMAT_HH_MM_SS = 7 ,
  TIME_FORMAT_XX = 8 , TIME_FORMAT_HH_MM_XX , TIME_FORMAT_HH_MM_SS_XX , TIME_FORMAT_H = 16 ,
  TIME_FORMAT_H_MM_SS = 19 , TIME_FORMAT_H_MM_SS_XX , TIME_FORMAT_SECS = 32 , TIME_FORMAT_MINS = 64 ,
  TIME_FORMAT_HOURS = 128 , TIME_FORMAT_M = 256
}
 TIME_FORMAT enum/bitmask used for formatting time strings Note the use of bitmasking, e.g. TIME_FORMAT_HH_MM_SS = TIME_FORMAT_HH | TIME_FORMAT_MM | TIME_FORMAT_SS. More...
 

Enumeration Type Documentation

◆ TIME_FORMAT

TIME_FORMAT enum/bitmask used for formatting time strings Note the use of bitmasking, e.g. TIME_FORMAT_HH_MM_SS = TIME_FORMAT_HH | TIME_FORMAT_MM | TIME_FORMAT_SS.

See also
StringUtils::SecondsToTimeString
Note
For InfoLabels use the equivalent value listed (bold) on the description of each enum value.
Example: 3661 seconds => h=1, hh=01, m=1, mm=01, ss=01, hours=1, mins=61, secs=3661

v18 Skinning engine changes
[Infolabels Updated] Added secs, mins, hours (total time) and m as possible formats for InfoLabels that support the definition of a time format. Examples are:
Enumerator
TIME_FORMAT_GUESS 

usually used as the fallback value if the format value is empty

TIME_FORMAT_SS 

ss - seconds only

TIME_FORMAT_MM 

mm - minutes only (2-digit)

TIME_FORMAT_MM_SS 

mm:ss - minutes and seconds

TIME_FORMAT_HH 

hh - hours only (2-digit)

TIME_FORMAT_HH_SS 

hh:ss - hours and seconds (this is not particularly useful)

TIME_FORMAT_HH_MM 

hh:mm - hours and minutes

TIME_FORMAT_HH_MM_SS 

hh:mm:ss - hours, minutes and seconds

TIME_FORMAT_XX 

xx - returns AM/PM for a 12-hour clock

TIME_FORMAT_HH_MM_XX 

hh:mm xx - returns hours and minutes in a 12-hour clock format (AM/PM)

TIME_FORMAT_HH_MM_SS_XX 

hh:mm:ss xx - returns hours (2-digit), minutes and seconds in a 12-hour clock format (AM/PM)

TIME_FORMAT_H 

h - hours only (1-digit)

TIME_FORMAT_H_MM_SS 

hh:mm:ss - hours, minutes and seconds

TIME_FORMAT_H_MM_SS_XX 

hh:mm:ss xx - returns hours (1-digit), minutes and seconds in a 12-hour clock format (AM/PM)

TIME_FORMAT_SECS 

secs - total time in seconds

TIME_FORMAT_MINS 

mins - total time in minutes

TIME_FORMAT_HOURS 

hours - total time in hours

TIME_FORMAT_M 

m - minutes only (1-digit)