Webtags/Parameters: Difference between revisions

3,049 bytes removed ,  09:58, 3 October 2022
m
Line 193: Line 193:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
!style="width:150px" | [[File:Badge v1.png]]Delphi Specifier for Cumulus 1.9.x
!style="width:150px" | Mono/.NET Specifier for Cumulus MX
!style="width:150px" | [[File:Badge vMx.png]]Mono/.NET Specifier for Cumulus MX
!style="width:600px" | Displays
!style="width:600px" | Displays
!style="width:600px" | Example
!style="width:600px" | Example
|-
|-
|h
|%h
|%h
|Displays the hour (12 hour clock) without a leading zero (1-12)  
|Displays the hour (12 hour clock) without a leading zero (1-12)  
| 7
| 7
|-
|-
|h ''AM/PM''
|%h ''tt''
|%h ''tt''
|Displays the hour (12 hour clock) without a leading zero (1-12)  in combination with AM/PM.  
|Displays the hour (12 hour clock) without a leading zero (1-12)  in combination with AM/PM.  


[[File:Badge v1.png]]For Cumulus 1 the formats for am/pm depend on the case in which you type the parameter as shown later in this table
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).
 
| 7 PM
[[File:Badge vMx.png]]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).
| [[File:Badge v1.png]]7 PM
|-
|-
|h:nn [''AM/PM'']
|%h:mm [''tt'']
|%h:mm [''tt'']
|Displays the hour (using 12 hour clock) without a leading zero (1-12) followed by 2 digit minutes [optionally in combination with AM/PM whose case varies as explained in previous entry].
|Displays the hour (using 12 hour clock) without a leading zero (1-12) followed by 2 digit minutes [optionally in combination with AM/PM whose case varies as explained in previous entry].
 
|'10:27 am' produced by <#LastDataReadT format="h:mm tt">
[[File:Badge v1.png]]For Cumulus 1, the minutes can be represented by 'mm' (instead of "nn") only when appearing in combination with 'h'
|'10:27 am' produced by [[File:Badge v1.png]] <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt">
|-
|-
|H (or ''H'')
|%H
|%H
| Displays the hour part of any duration or clock time, without a leading zero (0-23).
| Displays the hour part of any duration or clock time, without a leading zero (0-23).


[[File:Badge vMx.png]]Note that '%' before the "H", this makes it a custom modifier, needed because H is on its own.
Note that '%' before the "H", this makes it a custom modifier, needed because H is on its own.
|7 produced by  
|7 produced by  
* [[File:Badge v1.png]]<#daylength format=H>
<#daylength format=%H>
*[[File:Badge vMx.png]]<#daylength format=%H>
|-
|-
| H:mm (or ''H:nn'')
| H:mm
| H:mm
| Displays the hour part of any duration or clock time, without a leading zero (0-23) followed by 2 digit minutes for that duration or clock time.
| Displays the hour part of any duration or clock time, without a leading zero (0-23) followed by 2 digit minutes for that duration or clock time.
|'6:27' or '17:49' produced by <#LastDataReadT format="H:mm">
|'6:27' or '17:49' produced by <#LastDataReadT format="H:mm">
|-
|-
|HH (or ''hh'')
|HH
|HH
| Displays the hour part of any duration or clock time, using 24 hour clock with a leading zero (00-23).
| Displays the hour part of any duration or clock time, using 24 hour clock with a leading zero (00-23).
|'06' or '17' produced by <#LastDataReadT format=HH>
|'06' or '17' produced by <#LastDataReadT format=HH>
|-
|-
|hh [''am/pm''][''AM/PM'']
|hh [''tt'']
|hh [''tt'']
| Displays the hour part of any duration or clock time, (12 hour clock) with a leading zero (01-12) [optionally, if it is a clock time, in combination with am/pm].
| Displays the hour part of any duration or clock time, (12 hour clock) with a leading zero (01-12) [optionally, if it is a clock time, in combination with am/pm].


[[File:Badge v1.png]]For Cumulus 1, two optional terms are shown because the case output for the optional 'am/pm' depends on the case used for that parameter
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 but before midnight.  
 
|'07 am' produced by  
[[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 but before midnight.  
<#LastDataReadT format="hh tt"> if locale specifies lower case
|'07 am' produced by
* [[File:Badge v1.png]] <#LastDataReadT format="hh am/pm">
*[[File:Badge vMx.png]] <#LastDataReadT format="hh tt"> if locale specifies lower case
|-
|-
|hh:mm (or ''hh:nn'' or 'HH:NN') [''am/pm''][''AM/PM'']
|hh:mm [''tt'']
|hh:mm [''tt'']
| Displays the hour part of any duration or clock time, (12 hour clock) with a leading zero (01-12) followed by 2 digit minutes [optionally, if it is a clock time, in combination with am/pm].
| Displays the hour part of any duration or clock time, (12 hour clock) with a leading zero (01-12) followed by 2 digit minutes [optionally, if it is a clock time, in combination with am/pm].
* [[File:Badge v1.png]]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, two optional terms are shown because the case output for the optional 'am/pm' depends on the case used for that parameter
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
|'8:27 am' produced by
* [[File:Badge v1.png]] <#LastDataReadT format="h:nn am/pm">
<#LastDataReadT format="h:mm tt"> if locale specifies lower case
*[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt"> if locale specifies lower case
|-
|-
|n
|%m
|%m
|Displays the minutes of any duration or clock time, without a leading zero (0-59).  
|Displays the minutes of any duration or clock time, without a leading zero (0-59).  


[[File:Badge vMx.png]] As other examples show, the % is only needed when "m" is on its own.
As other examples show, the % is only needed when "m" is on its own.
| 7 produced as a duration in minutes by
| 7 produced as a duration in minutes by
* [[File:Badge v1.png]]<#daylength format=n>
<#daylength format=m>
*[[File:Badge vMx.png]]<#daylength format=m>
|-
|-
|nn
|mm
|mm
|Displays the minutes of any duration or clock time, with a leading zero (00-59).  
|Displays the minutes of any duration or clock time, with a leading zero (00-59).  
|'07' produced as a duration in minutes by
|'07' produced as a duration in minutes by
* [[File:Badge v1.png]]<#daylength format=nn>
<#daylength format=mm>
* [[File:Badge vMx.png]]<#daylength format=mm>
|-
|-
|s
|%s
|%s
|Displays the seconds for any duration or clock time, that has resolution to less than a minute, without a leading zero (0-59).  
|Displays the seconds for any duration or clock time, that has resolution to less than a minute, without a leading zero (0-59).  
 
| 9 produced by <#metdate format=%s>
[[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 produced by <#metdate format=s>
|-
|-
|ss
|ss
|ss
|Displays the second with a leading zero (00-59).
|Displays the second with a leading zero (00-59).
|'06' or 19 produced by <#LastDataReadT format=ss>
|'06' or 19 produced by <#LastDataReadT format=ss>
|-
|-
|z
|FFF
|FFF
|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).  
|Displays the millisecond without a leading zero. 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 (before Windows 10 64-bit systems) only has precision to 15 ms, so don't use this modifier if your Cumulus is running on an old version of Microsoft Windows.
Note that the system clock (before Windows 10 64-bit systems) only has precision to 15 ms, so don't use this modifier if your Cumulus is running on an old version of Microsoft Windows.
|  
|  
|-
|-
|(not available)
|ff (or ''f'')
|ff (or ''f'')
|Displays hundredths of a second (or tenths) with leading zero(s)
|Displays hundredths of a second (or tenths) with leading zero(s)
|
|
|-
|-
|zzz
|fff
|fff
|Displays the millisecond with a leading zero (000-999).  
|Displays the millisecond with a leading zero (000-999).  
Line 304: Line 274:
Note that the system clock (before Windows 10 64-bit systems) only has precision to 15 ms, so don't use this modifier if your Cumulus is running on an old version of Microsoft Windows.
Note that the system clock (before Windows 10 64-bit systems) only has precision to 15 ms, so don't use this modifier if your Cumulus is running on an old version of Microsoft Windows.


[[File:Badge vMx.png]]The 'fff' modifier in MX can actually be extended to 'ffffff' for output to a millionth of a second!
The 'fff' modifier can actually be extended to 'ffffff' for output to a millionth of a second!
| 09:47:25.000' produced by  
| 09:47:25.000' produced by  
* [[File:Badge v1.png]]<#time format=hh:nn:ss.zzz>
<#time format=hh:mm:ss.fff>
*[[File:Badge vMx.png]]<#time format=hh:mm:ss.fff>
|-
|-
|(not available)
| zzz
| zzz
|Displays the offset of any time from UTC in hours and minutes   
|Displays the offset of any time from UTC in hours and minutes   
| e.g.-07:00
| e.g.-07:00
|-
|-
|(not available)
|"h:mm K"
|"h:mm K"
|Effectively another way of including time zone after a time, but it can only be used for time-zones never matching UTC (if I understand correctly)
|Effectively another way of including time zone after a time, but it can only be used for time-zones never matching UTC (if understood correctly)
|(no examples supplied yet)
|(no examples supplied yet)
|-
|-
|t
|%t
|%t
|Displays the time using the Short Time format.  
|Displays the time using the Short Time format.  


[[File:Badge vMx.png]]Remember that 't' combined with other specifiers (or preceded by space or '%') has a different meaning - see below.
Remember that 't' combined with other specifiers (or preceded by space or '%') has a different meaning - see below.
| '09:47' produced by <#LastDataReadT format=t> (might not use colon in your locale) for both flavours of Cumulus
| '09:47' produced by <#LastDataReadT format=t> (might not use colon in your locale)
|-
|-
|am/pm or Am/Pm or AM/PM
|tt
|tt
| [[File:Badge v1.png]]Uses the 12-hour clock for the preceding h or H specifier, and displays 'am' for any (clock time) 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.
|'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".
 
|
[[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".
| [[File:Badge v1.png]] 'am' produced by <#LastDataReadT format=am/pm>, 'AM' produced by <#LastDataReadT format=AM/PM>
|-
|-
|h a/p
|h t
|h t
|Uses the 12-hour clock for the preceding h or H (clock time) 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 (clock time) specifier, and displays 'a' for any hour from midnight until before noon, and 'p' for noon or any hour after noon.


[[File:Badge v1.png]]The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
whether it displays the "a" or "p" in capitals or lower case is determined by the locale settings, not the case of "t".
 
[[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
|-
|-
|ampm
|(see above for 12 hour formats)
|This 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 v1.png]]Uses the 12-hour clock for the preceding h or H specifier
| see previous examples
|-
|/
|/
|/
|Displays the date separator character given by the Date Separator. It might not display a slash.
|Displays the date separator character given by the Date Separator. It might not display a slash.
Line 354: Line 307:
|-
|-
|:
|:
|:
|Displays the time separator character given by the Time Separator, this 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.
Note that by default Cumulus MX expects a locale to use ":" for any time separator.
|':' for British locale
|':' for British locale
|}
|}


====Year formats====
====Year formats====