This page documents the strings used to format dates and/or time on the eGauge device. If you are working on a translation, you can see the effects of different string formats here.
Date/time format string:
Current Date/Time: | n/a |
---|---|
9 o'clock in the morning: | n/a |
9 o'clock in the evening: | n/a |
1st of January: | n/a |
31st of December: | n/a |
Code | Description |
---|---|
y | 4-digit year (e.g., 2015) |
yyyy | 4-digit year (e.g., 2015) |
yy | Last two digits of year (e.g., 15) |
MMM | Full month name (e.g., January) |
NNN | Abbreviated month name (e.g., Jan) |
MM | 2-digit month number (e.g., 01) |
M | 1- or 2-digit month number (e.g., 1) |
dd | 2-digit day of month (e.g., 01) |
d | 1- or 2-digit day of month (e.g., 1) |
EE | Full weekday name (e.g., Monday) |
E | Abbreviated weekday name (e.g., Mon) |
hh | 2-digit hour, 1-12 hours (e.g., 01) |
h | 1- or 2-digit hour, 1-12 hours (e.g., 1) |
a | am for morning hours, pm for afternoon hours |
HH | 2-digit hour, 0-23 hours (e.g., 01) |
H | 1- or 2-digit hour, 0-23 hours (e.g., 1) |
KK | 2-digit hour, 0-11 hours (e.g., 00) |
K | 1- or 2-digit hour, 0-11 hours (e.g., 0) |
mm | 2-digit minute (e.g., 00) |
m | 1- or 2-digit minute (e.g., 0) |
ss | 2-digit second (e.g., 00) |
s | 1- or 2-digit second (e.g., 0) |
For example, with a parse format string of
M(/y)a user could enter the month and year, separated by a slash character (/). However, since the part after / is enclosed in parentheses, it is optional.
Thus, the user could enter
5to indicate month 5 (May) or
5/2015to indicate May 2015. For optional parts, the eGauge user interface will use sensible defaults (e.g., the current year).