Webtags/Parameters: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
1,352 bytes removed ,  13:04, 3 October 2022
m
Line 206: Line 206:


====Month formats====
====Month formats====
All locales offer both numerical and alphabetical formats for representing months.
*In the following table "MMM"  is shown as producing short month name.
**What language is used, and how many characters appear, depend on what is set up for your language in your settings (by default or by you changing your settings)
** In Australian locale, this would output 4 characters representing a month abbreviation that runs from "Jan." to "Dec."
** In British English (UK) locale, abbreviations do not incude a full stop, so output is a 3 letter abbreviation that starts with "Jan" and runs to "Dec"
*In the following table "MMMM" is shown as producing the full name for a month
**The output you get will depend on the language defined in your locale
**In all English based locales, the output will be in the range "January" to "December"
[[File:Badge vMx.png]]'''CAUTION:''' Cumulus MX has yet another complication, a web tag can return different months depending on whether the output modifier for month is used with, or without, an output modifier for day.  Take two examples <code><#metdateyesterday format=yyyy-MM-dd></code> and <code><#metdateyesterday format=yyyy-MM></code>, these can produce different months when processed by MX on same day at near enough same time! Let us assume the first is reporting (in a particular year) the first day of June, the second would report the month of May in same year!


{| 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
|-
|-
|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).  
* [[File:Badge v1.png]]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.
 
* [[File:Badge vMx.png]]Cumulus MX: Note that including a ' ' (space) or '%' before the M makes it a custom modifier, so giving a different output to the '''format=M''' included in table in [[#Date formats]] subsection.
Note that including a '%' before the M makes it a custom modifier giving a different output to the '''format=M''' (which produces e.g. '3 october').
|2
|10 produced by <#date format=%M>
|-
|-
|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).  
* [[File:Badge v1.png]]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> or  <#metdate format="MM">
|'03' produced by <#LastDataReadT format=MM> or  <#metdate format="MM">
|-
|-
|MMM (or ''mmm'')
|MMM
|MMM
|Displays the month using the strings defined for '''short month name''' in the Locale.
|Displays the month using the strings defined for '''short month name''' in the Locale.
|'Jun.' or 'Jun' produced by <#metdate format="MMM"> (varies depending which English locale as explained before table)
 
Note that some locales produce a dot after the three letter abbreviation!
|'Jun.' produced by <#metdate format="MMM"> depending on the locale
|-
|-
|MMMM (or ''mmmm'')
|MMMM
|MMMM
|Displays the month as a full name using the strings appropriate to the Locale.
|Displays the month as a full name using the strings appropriate to the Locale.
|'June' produced by <#metdate format="MMMM"> (English locale)
|'June' produced by <#metdate format="MMMM"> (English locale)
|}
|}
[VERIFY!!]
'''CAUTION:''' Cumulus MX has yet another complication, a web tag can return different months depending on whether the output modifier for month is used with, or without, an output modifier for day.  Take two examples <code><#metdateyesterday format=yyyy-MM-dd></code> and <code><#metdateyesterday format=yyyy-MM></code>, these can produce different months when processed by MX on same day at near enough same time! Let us assume the first is reporting (in a particular year) the first day of June, the second would report the month of May in same year!


====Day formats====
====Day formats====

Navigation menu