Webtags (preserving history): Difference between revisions
From Cumulus Wiki
Jump to navigationJump to search
|-
|c
|G (as single character format)
|Displays the date using the format given by the Short Date format, followed by the time using the format given by the Long Time format. The time is not displayed in Cumulus 1 if the date-time value indicates midnight precisely.
|'22/03/2019 09:47:25' produced by {{Version badge 1}}<#time format=c>[[File:Badge vMx.png]]<#time format=G>
|ddddd
|d (as single character format)
|Displays the date using the format given by the Short Date format. [[File:Badge vMx.png]]The MX parameter cannot be combined with any other parameters.
|e.g. '22/03/2019' (British Locale) produced by {{Version badge 1}}<#metdate format="ddddd">[[File:Badge vMx.png]]<#metdate format="d">
|-
|dddddd
|D (as single character format)
|Displays the date using the format given by the Long Date format. [[File:Badge vMx.png]]The MX parameter cannot be combined with any other parameters.
|e.g. '22 March 2020' (British Locale)
|-
|Displays the hour (12 hour clock) without a leading zero (1-12) [optionally in combination with AM/PM]. What "tt" produces depends on locale settings for your device, it might be capitals or it might be lower case (in Windows use Control Panel, not Settings app, to get to these regional additional settings).
{{Version badge 1}}For Cumulus 1 the formats for am/pm depend on the case in which you type the parameter as shown later in this table
[[File:Badge vMx.png]]Note that including a ' ' (space) or '%' before the "h" makes it a custom modifier, that is not needed if the " tt" follows, as multiple parameters are always custom modifiers
|-
|h:mm (or ''h:nn'') [''AM/PM'']
|H (or ''H'')
|%H
|Displays the hour using 24 hour clock without a leading zero (0-23). [[File:Badge vMx.png]]Note that including a ' ' (space) or '%' before the "H" makes it a
|7 produced by {{Version badge 1}}<#daylength format=H>
[[File:Badge vMx.png]]<#daylength format=%H>
|H:mm (or ''H:nn'')
|H:mm
|Displays the hour using 24 hour clock without a leading zero (0-23) followed by 2 digit minutes. [[File:Badge vMx.png]]Note that %, of previous example, is not needed when H is not on its own.
|'7:27' produced by <#LastDataReadT format="H:mm">
|-
|'07 am' produced by {{Version badge 1}} <#LastDataReadT format="hh am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="hh tt">
|-
|hh:mm (or ''hh:nn'' or 'HH:NN') [''am/pm'']
|hh:mm [''tt'']
|Displays the hour (12 hour clock) with a leading zero (01-12) followed by 2 digit minutes [optionally in combination with am/pm].
{{Version badge 1}}For Cumulus 1, the minutes can be represented by 'mm' only when in combination with 'h', in other contexts 'mm' is interpreted as month number, and the case output for am/pm depends on the case used for that parameter as shown later in this table. As Cumulus 1 is case insensitive there are variants with capital letters available.
[[File:Badge vMx.png]] For MX, the optional 'tt' displays the contents of the device locale setting for AM string for midnight until any hour before noon, and the contents of the PM string for noon or any hour after noon before midnight
|'8:27 am' produced by {{Version badge 1}} <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt">
|s
|%s
|Displays the second without a leading zero (0-59). [[File:Badge vMx.png]] As other examples show, the % is
| 9
|-
|z
|FFF
|Displays the millisecond without a leading zero (Cumulus 1: displays 0-999, Cumulus MX: displays either nothing, or displays 1-999
Note that the system clock in non-current versions of Windows only has precision to 15 ms, so don't use this modifier if your Cumulus is running on an old version of Windows.
|
|-
|Displays the millisecond with a leading zero (000-999). Note that the system clock in some versions of Windows only has precision to 15 ms, so requesting thousandths of a second may not return anything useful.
[[File:Badge vMx.png]]The 'fff' modifier in MX can actually be extended to 'ffffff' for output to a millionth of a second!
| 09:47:25.000' produced by {{Version badge 1}}<#time format=hh:nn:ss.zzz>[[File:Badge vMx.png]]<#time format=hh:mm:ss.fff>
|-
|-
|TT
|T (as single character format)
|Displays the time using the Long Time format. [[File:Badge vMx.png]] Note that this is a full time specifier and "T"
|'09:47:56' (might not use colon in your locale) produced by {{Version badge 1}}<#LastDataReadT format=TT> [[File:Badge vMx.png]]<#LastDataReadT format=T>
|-
|{{Version badge 1}}Uses the 12-hour clock for the preceding h or H specifier, and displays 'am' for any hour from midnight until just before noon, and 'pm' for any hour from noon onwards. The am/pm specifier for Cumulus 1 can use lower, upper, or mixed case, and the result is displayed accordingly.
[[File:Badge vMx.png]] For MX, 'tt' displays the contents of the device locale setting for AM string for midnight until any hour before noon, and the contents of the PM string for noon or any hour after noon before midnight, so whether it displays in capitals or lower case is determined by the locale settings, not the case of "tt".
| {Version badge 1}} 'am' produced by <#LastDataReadT format=am/pm>, 'AM' produced by <#LastDataReadT format=AM/PM>
|-
|h a/p
|
|Uses the 12-hour clock for the preceding h or H specifier, and displays 'a' for any hour from midnight until before noon, and 'p' for noon or any hour after noon.
{{Version badge 1} The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
[[File:Badge vMx.png]]whether it displays the "a" or "p" in capitals or lower case is determined by the locale settings, not the case of "t".
| see previous example
|-
|:
|:
|Displays the time separator character given by the Time Separator.
[[File:Badge vMx.png]]Note that by default Cumulus MX expects a locale to use ":" for any time separator.
|':' for British locale
|-
|'xy'
|'xy' or ''\x\y''
|Characters enclosed in single quotation marks are displayed as such, and do not affect formatting.
[[File:Badge vMx.png]]In MX each character to be displayed as it was typed can be prefixed by a backslash. Also remember that any spaces in a MX modifier might need to be within single quotes as space is also used to change what a modifier represents. I told you MX modifiers were more complicated!
|Hyphens are added in this PHP language example '<#LastDataReadT format=yyyy>'.'-'.'<#LastDataReadT format=MM>'.'-'.'<#LastDataReadT format="dd">'
|}
|