Webtags (preserving history): Difference between revisions

m
Line 417: Line 417:
|-
|-
|c
|c
|G
|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.
|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>
|'22/03/2019 09:47:25' produced by {{Version badge 1}}<#time format=c>[[File:Badge vMx.png]]<#time format=G>
Line 443: Line 443:
|ddddd
|ddddd
|d (as single character format)
|d (as single character format)
|Displays the date using the format given by the Short Date 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">
|e.g. '22/03/2019' (British Locale) produced by {{Version badge 1}}<#metdate format="ddddd">[[File:Badge vMx.png]]<#metdate format="d">
|-
|-
|dddddd
|dddddd
|D
|D (as single character format)
|Displays the date using the format given by the Long Date 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)
|e.g. '22 March 2020' (British Locale)
|-
|-
Line 488: Line 488:
|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).
|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
{{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:mm (or ''h:nn'') [''AM/PM'']
Line 497: Line 499:
|H (or ''H'')
|H (or ''H'')
|%H
|%H
|Displays the hour using 24 hour clock without a leading zero (0-23). [[File:Badge vMx.png]]Note that % is only needed when H is on its own.
|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 custom modifier, needed because H is on its own.
|7 produced by {{Version badge 1}}<#daylength format=H>
|7 produced by {{Version badge 1}}<#daylength format=H>
[[File:Badge vMx.png]]<#daylength format=%H>
[[File:Badge vMx.png]]<#daylength format=%H>
Line 503: Line 505:
|H:mm (or ''H:nn'')
|H:mm (or ''H:nn'')
|H:mm
|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 % is not needed when H is not on its own.
|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">
|'7:27' produced by <#LastDataReadT format="H:mm">
|-
|-
Line 518: Line 520:
|'07 am' produced by {{Version badge 1}} <#LastDataReadT format="hh am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="hh tt">
|'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'') [''am/pm'']
|hh:mm (or ''hh:nn'' or 'HH:NN') [''am/pm'']
|hh:mm [''tt'']
|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].
|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
{{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
[[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">
|'8:27 am' produced by {{Version badge 1}} <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt">
Line 537: Line 539:
|s
|s
|%s
|%s
|Displays the second without a leading zero (0-59). [[File:Badge vMx.png]] As other examples show, the % is only needed when "m" is on its own.
|Displays the second without a leading zero (0-59). [[File:Badge vMx.png]] As other examples show, the % is recommended when "s" is on its own, although I have not found any alternative meaning for "s" on its own.
| 9
| 9
|-
|-
Line 547: Line 549:
|z
|z
|FFF
|FFF
|Displays the millisecond without a leading zero (Cumulus 1:0-999, Cumulus MX: nothing, or 1-999). Note that the system clock in some versions of Windows only has precision to 15 ms.
|Displays the millisecond without a leading zero (Cumulus 1: displays 0-999, Cumulus MX: displays either nothing, or displays 1-999, so don't write any code that assumes the MX output is numeric).  
 
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.
|  
|  
|-
|-
Line 559: Line 563:
|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.  
|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.  


The 'fff' modifier in MX can actually be extended to 'ffffff' for output to a millionth of a second!
[[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>
| 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>
|-
|-
Line 578: Line 582:
|-
|-
|TT
|TT
|T
|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" does not need a "%" although it is on its own.
|Displays the time using the Long Time format. [[File:Badge vMx.png]] Note that this is a full time specifier and "T" is on its own as we are using a single character format.
|'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>
|'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>
|-
|-
Line 586: Line 590:
|{{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.
|{{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
[[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>
| {Version badge 1}} 'am' produced by <#LastDataReadT format=am/pm>, 'AM' produced by <#LastDataReadT format=AM/PM>
|-
|-
|a/p
|h a/p
|%t
|h t
|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.
|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.
{{Version badge 1} The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
[[File:Badge vMx.png]]Remember that 't' has to be combined with other specifiers (or preceded by space or '%') to display 'a' or 'p' as if it is alone it has a different (short format time) meaning - see above.
 
[[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
| see previous example
|-
|-
Line 609: Line 614:
|:
|:
|:
|:
|Displays the time separator character given by the Time Separator. It might not display a colon.
|Displays the time separator character given by the Time Separator. With Cumulus 1, this might not display a colon.
 
[[File:Badge vMx.png]]Note that by default Cumulus MX expects a locale to use ":" for any time separator.
|':' for British locale
|':' for British locale
|-
|-
|'xy'
|'xy'
|'xy' or ''\x\y''
|'xy' or ''\x\y''
|Characters enclosed in single quotation marks are displayed as such, and do not affect formatting. In MX each character to be displayed as it was typed can be prefixed by a backslash.
|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">'
|Hyphens are added in this PHP language example  '<#LastDataReadT format=yyyy>'.'-'.'<#LastDataReadT format=MM>'.'-'.'<#LastDataReadT format="dd">'
|}
|}
5,838

edits