I18N Date/Time Tester

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:

Resulting output:

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

Available Formatting Codes:

CodeDescription
y4-digit year (e.g., 2015)
yyyy4-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)
MM2-digit month number (e.g., 01)
M 1- or 2-digit month number (e.g., 1)
dd2-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)
aam 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)
mm2-digit minute (e.g., 00)
m1- or 2-digit minute (e.g., 0)
ss2-digit second (e.g., 00)
s1- or 2-digit second (e.g., 0)


Formatting Codes for Parsing Date and Time Values:


Just like for converting dates and times to strings, you can use formatting codes to specify how dates and times can be entered. The codes are the same as for converting them to strings. The only exception is that optional parts can be specified by enclosing them in parentheses.

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

5
to indicate month 5 (May) or
5/2015
to indicate May 2015. For optional parts, the eGauge user interface will use sensible defaults (e.g., the current year).