L-VIS User Manual
121
LOYTEC
Version 6.2
LOYTEC electronics GmbH
When used in conjunction with a year number, make sure to use
Year in “Week
of Year”
instead of the standard calendar year. Pattern symbol
w
.
Cyclic Year Name:
Calendars such as the Chinese lunar calendar (and related
calendars) and the Hindu calendars use 60-year cycles of year names. If the
calendar does not provide cyclic year name data, or if the year value to be
formatted is out of the range of years for which cyclic name data is provided,
then numeric formatting is used (standard calendar year). Symbol
U
.
9.5.7.4 Pattern Management
When a new date control is added, it comes with one pre-defined pattern. This default
pattern uses the
auto-formatter
and requests the
year
,
month
,
day
,
hour
, and
minute
fields. Using the US English locale, this results in an output like
Aug 8, 2017, 3:02
, while
the same date control will output
平成
29
年
8
月
8
日
15:02
in the Japanese locale with
Japanese calendar. Starting from this default, the list of requested date fields can be
modified using the controls above the field list. New fields are simply added by double-
click on the desired field from the list of available date pattern fields, or selection of the
field and click on the + button above the list of currently selected fields after selecting the
desired field width (see below).
NOTE:
If the auto-formatter is deactivated, the field Hour (default) has to be removed, as it is only
valid in auto-formatted patterns. Direct formatting requires manual selection of the desired
hour format (12h or 24h system, 0 or 1 based).
If an additional pattern is required, it can be added via the + button next to the pattern select
drop-down at the very top of the property page. The new pattern will be appended to the
end of the current control text on the same line. Use the
Editor
property-page to add
newlines or other static text as required. The pattern select drop-down can be used to select
the pattern to be edited. The drop-down will always show the patterns in the order in which
they appear in the control text.
New patterns can also be added at the desired location directly in the text editor, patterns
can be moved to different locations or removed entirely. The UI will parse the text and
update the property page to reflect the current control contents. If the pattern field syntax is
unknown, empty patterns can be placed manually as
${}
(auto-format), or
${#}
(raw format),
and the desired fields can be added via the UI.
9.5.7.5 Field Width
For each of the available date fields, multiple field widths or display variants are available
to choose from. For purely numeric fields, there is usually a selection of
numeric
or
2-digit
and sometimes
3-digit
available. The standard numeric variant usually results in the
minimum number of digits, while 2-digit will pad the number to always be 2 digits wide
(useful for time fields). A special case is the year field, where 2-digit cuts off the higher
order digits and outputs the two least significant digits only (
17
instead of
2017
).
If a field can be displayed in textual form, there are a number of different lengths available,
like
abbreviated
,
wide
,
narrow
, or
short
. Some of these selections may not be available
for certain fields, or may result in the same output, depending on the data provided by the
selected locale. In general,
wide
is the most verbose form, for example a complete day of
week name like
Thursday
,
abbreviated
results in the most common abbreviation like
Thu
,
short is an even shorter and probably uncommon version like
Th
, and
narrow
is a really
short form, which would be
T
in this example.
To change the field width of a date field after it was already added to the pattern, select the
desired field from the list of fields contained in the pattern and choose the appropriate
display variant from the drop-down box above the list. The field will be updated and the
result can be seen immediately in the LCD preview.