Webtags/Parameters: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
{| class="wikitable" border="1"
|-
!style="width:150px" | [[File:Badge v1Mono/.png]]DelphiNET Specifier for Cumulus 1.9.xMX
!style="width:150px" | [[File:Badge vMx.png]]Mono/.NET Specifier for Cumulus MX
!style="width:600px" | Displays
!style="width:600px" | Example
|-
|h
|%h
|Displays the hour (12 hour clock) without a leading zero (1-12)
| 7
|-
|h ''AM/PM''
|%h ''tt''
|Displays the hour (12 hour clock) without a leading zero (1-12) in combination with AM/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]]For Cumulus 1 the formats for am/pm depend on the case in which you type the parameter as shown later in this table
| 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'']
|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 9am' produced by <#metdateLastDataReadT format=s"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
| 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.
|7 produced by
* [[File:Badge v1.png]]<#daylength format=%H>
*[[File:Badge vMx.png]]<#daylength format=%H>
|-
| H:mm (or ''H:nn'')
| 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.
|'6:27' or '17:49' produced by <#LastDataReadT format="H:mm">
|-
|HH (or ''hh'')
|HH
| 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>
|-
|hh [''am/pm''][''AM/PM'']
|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].
 
|ThisThe 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.
[[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
|'07 am' produced by
 
*[[File:Badge vMx.png]] <#LastDataReadT format="hh tt"> if locale specifies lower case
[[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.
|'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'']
| 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 vMx.png]] For MX, theThe 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 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
*[[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
* [[File:Badge v1.png]] <#LastDataReadT format="h:nnmm am/pmtt"> if locale specifies lower case
*[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt"> if locale specifies lower case
|-
|n
|%m
|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.
| 7 produced as a duration in minutes by
* [[File:Badge v1.png]] <#daylength format=nm>
*[[File:Badge vMx.png]]<#daylength format=m>
|-
|nn
|mm
|Displays the minutes of any duration or clock time, with a leading zero (00-59).
|'07' produced as a duration in minutes by
* [[File:Badge v1.png]] <#daylength format=nnmm>
* [[File:Badge vMx.png]]<#daylength format=mm>
|-
|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).
| 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
|Displays the second with a leading zero (00-59).
|'06' or 19 produced by <#LastDataReadT format=ss>
|-
|z
|FFF
|Displays the millisecond without a leading zero. (Cumulus 1: displays 0-999, Cumulus MX: displaysDisplays either nothing, or displays 1-999,. soSo 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.
|
|-
|(not available)
|ff (or ''f'')
|Displays hundredths of a second (or tenths) with leading zero(s)
|
|-
|zzz
|fff
|Displays the millisecond with a leading zero (000-999).
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!
| 09:47:25.000' produced by
* [[File:Badge v1.png]] <#time format=hh:nnmm:ss.zzzfff>
*[[File:Badge vMx.png]]<#time format=hh:mm:ss.fff>
|-
|(not available)
| zzz
|Displays the offset of any time from UTC in hours and minutes
| e.g.-07:00
|-
|(not available)
|"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 understandunderstood correctly)
|(no examples supplied yet)
|-
|t
|%t
|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.
| '09:47' produced by <#LastDataReadT format=t> (might not use colon in your locale) for both flavours of Cumulus
|-
|am/pm or Am/Pm or AM/PM
|tt
|'tt' [[File:Badge v1.png]]Usesdisplays the 12-hourcontents clock forof the precedingdevice hlocale orsetting Hfor specifier,AM and displays 'am'string for any (clock time) hour from midnight until justany hour before noon, and 'pm'the contents of the PM string for noon or any hour fromafter noon onwards.before Themidnight, am/pmso specifierwhether forit Cumulusdisplays 1in cancapitals useor lower, upper,case oris mixeddetermined caseby the locale settings, andnot the result iscase displayedof accordingly"tt".
|h
 
[[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
|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 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".
[[File:Badge v1.png]]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
|-
|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 time separator character given by the Time Separator. With Cumulus 1, 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.
|':' for British locale
|}
 
 
====Year formats====

Navigation menu