Webtags (preserving history): Difference between revisions

m
Line 132: Line 132:
|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.
|
|e.g. '22/03/2019' (British Locale)
|-
|-
|dddddd
|dddddd
|D
|D
|Displays the date using the format given by the Long Date format.
|Displays the date using the format given by the Long Date format.
|
|e.g. '22 March 2020' (British Locale)
|-
|-
|m
|M (or ''m'')
|%M
|%M
|Displays the month as a number without a leading zero (1-12).  
|Displays the month as a number without a leading zero (1-12).  
*Cumulus 1.x.y:If the 'm' specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
*{{Version badge 1}}Cumulus 1.x.y:If the 'M' or 'm' specifier immediately follows an h, hh, HH, or H specifier, the minute rather than the month is displayed.
*Cumulus MX: Note that including a ' ' (space) or '%' before the M makes it a custom modifier e.g. '7' is returned for July as any initial zero is suppressed. ('M' on its own returns both Month and Day according to local format e.g. 22 July).
*[[File:Badge vMx.png]]Cumulus MX: Note that including a ' ' (space) or '%' before the M makes it a custom modifier e.g. '7' is returned for July as any initial zero is suppressed. ('M' on its own returns both Month and Day according to local format e.g. 22 July).
|
|2
|-
|-
|MM (or ''mm'')
|MM (or ''mm'')
|MM
|MM
|Displays the month as a number with a leading zero (01-12).  
|Displays the month as a number with a leading zero (01-12).  
*Cumulus 1.x.y:If the 'm' or 'M' specifier immediately follows an h, H, HH, or hh specifier, the minute rather than the month is displayed.
*{{Version badge 1}}Cumulus 1.x.y:If the 'm' or 'M' specifier immediately follows an h, H, HH, or hh specifier, the minute rather than the month is displayed.
|'03' produced by <#LastDataReadT format=MM>
|-
|-
|MMM (or ''mmm'')
|MMM (or ''mmm'')
|MMM
|MMM
|Displays the month as an abbreviation (Jan-Dec) using the strings appropriate to the Locale.
|Displays the month as an abbreviation (Jan-Dec) using the strings appropriate to the Locale.produced by <#metdate format="MM">
|'May' produced by <#metdate format="MMM">
|-
|-
|MMMM (or ''mmmm'')
|MMMM (or ''mmmm'')
|MMMM
|MMMM
|Displays the month as a full name (January-December) using the strings appropriate to the Locale.
|Displays the month as a full name (January-December) using the strings appropriate to the Locale.
|'May' produced by <#metdate format="MMMM">
|-
|-
|yy
|yy
|yy
|yy
|Displays the year as a two-digit number (00-99).
|Displays the year as a two-digit number (00-99).
|19 produced by <#LastDataReadT format=yy>
|-
|-
|yyyy
|yyyy
|yyyy
|yyyy
|Displays the year as a four-digit number (0000-9999).
|Displays the year as a four-digit number (0000-9999).
|2019 produced by <#LastDataReadT format=yyyy>
|-
|-
|h [''am/pm'']
|h [''am/pm'']
Line 171: Line 176:
|Displays the hour (12 hour clock) without a leading zero (1-12) followed by 2 digit minutes [optionally in combination with am/pm]. {{Version badge 1}}For Cumulus 1 there are other formats for am/pm shown later in this table
|Displays the hour (12 hour clock) without a leading zero (1-12) followed by 2 digit minutes [optionally in combination with am/pm]. {{Version badge 1}}For Cumulus 1 there are other formats for am/pm shown later in this table
|-
|-
|h:mm (or 'h:nn') [''am/pm'']
|h:mm (or ''h:nn'') [''am/pm'']
|h:mm [''tt'']
|h:mm [''tt'']
|Displays the hour (12 hour clock) without a leading zero (1-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', and there are other formats for am/pm shown later in this table
|Displays the hour (12 hour clock) without a leading zero (1-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', and there are other formats for am/pm shown later in this table
|'10:27 am' produced by {{Version badge 1}} <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt">
|-
|-
|H
|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 % is only needed when H is on its own.
|7 produced by {{Version badge 1}}<#daylength format=h>[[File:Badge vMx.png]]<#daylength format=%H>
|-
|-
|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 % is not needed when H is not on its own.
|'7:27' produced by <#LastDataReadT format="h:mm">
|-
|-
|hh (''am/pm'')
|hh (''am/pm'')
|hh [''tt'']
|hh [''tt'']
|Displays the hour (12 hour clock) with a leading zero (01-12) [optionally in combination with am/pm]. {{Version badge 1}}For Cumulus 1 there are other formats for am/pm shown later in this table
|Displays the hour (12 hour clock) with a leading zero (01-12) [optionally in combination with am/pm]. {{Version badge 1}}For Cumulus 1 there are other formats for am/pm shown later in this table
|'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'') [''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]. {{Version badge 1}}For Cumulus 1, the minutes can be represented by 'mm' only when in combination with 'h', and there are other formats for am/pm shown later in this table
|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', and there are other formats for am/pm shown later in this table
|'8:27 am' produced by {{Version badge 1}} <#LastDataReadT format="h:nn am/pm">[[File:Badge vMx.png]] <#LastDataReadT format="h:mm tt">
|-
|-
|HH (or ''hh'')
|HH (or ''hh'')
|HH
|HH
|Displays the hour using 24 hour clock with a leading zero (00-23).
|Displays the hour using 24 hour clock with a leading zero (00-23).
|'06' or 19 produced by <#LastDataReadT format=HH>
|-
|-
|n
|n
|m
|m
|Displays the minute without a leading zero (0-59).  
|Displays the minute without a leading zero (0-59).  
|7 produced by {{Version badge 1}}<#daylength format=n>[[File:Badge vMx.png]]<#daylength format=m>
|-
|-
|nn
|nn
|mm
|mm
|Displays the minute with a leading zero (00-59).
|Displays the minute with a leading zero (00-59).  
|'07' produced by {{Version badge 1}}<#daylength format=nn>[[File:Badge vMx.png]]<#daylength format=mm>
|-
|-
|s
|s
Line 210: Line 223:
|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>
|-
|-
|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:0-999, Cumulus MX: nothing, or 1-999). Note that the system clock in some versions of Windows only has precision to 15 ms.
|
|-
|-
|(not available)
|(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
|zzz
|fff
|fff
|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 can actually be extended to 'ffffff' for a millionth of a second!
|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 can actually be extended to 'ffffff' for a millionth of a second!
|
|-
|-
|t
|t
|t
|t
|Displays the time using the Short Time format.
|Displays the time using the Short Time format.
| '09:47' produced by <#LastDataReadT format=t> (might not use colon in your locale)
|-
|-
|TT
|TT
|T
|T
|Displays the time using the Long Time format.  
|Displays the time using the Long Time 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>
|-
|-
|am/pm
|am/pm
Line 236: Line 255:


{{Version badge 1}}The am/pm specifier for Cumulus 1 can use lower, upper, or mixed case, and the result is displayed accordingly.
{{Version badge 1}}The am/pm specifier for Cumulus 1 can use lower, upper, or mixed case, and the result is displayed accordingly.
| {Version badge 1}} 'am' produced by <#LastDataReadT format=am/pm>, 'AM' produced by <#LastDataReadT format=AM/PM>
|-
|-
|a/p
|a/p
|t
|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. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
|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. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
| see previous example
|-
|-
|ampm
|ampm
|(see above for 12 hour formats)
|(see above for 12 hour formats)
|Uses the 12-hour clock for the preceding h or H specifier, and displays the contents of the Windows AM string for midnight until any hour before noon, and the contents of the Windows PM string for noon or any hour after noon before midnight.
|Uses the 12-hour clock for the preceding h or H specifier, and displays the contents of the Windows AM string for midnight until any hour before noon, and the contents of the Windows PM string for noon or any hour after noon before midnight.
| 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.
| '/' for British locale
|-
|-
|:
|:
|:
|:
|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. It might not display a colon.
|':' 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. In MX each character to be displayed as it was typed can be prefixed by a backslash.
|Hypens are added in this PHP language example  '<#LastDataReadT format=yyyy>'.'-'.'<#LastDataReadT format=MM>'.'-'.'<#LastDataReadT format="dd">'
|}
|}


5,838

edits