Webtags/Parameters

From Cumulus Wiki
Revision as of 00:54, 8 April 2021 by Sfws (talk | contribs) (Created page with "=Introduction= ==What is a web tag? == Put simply, a web tag is included in a Cumulus template file to indicate where Cumulus should insert values when it ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

What is a web tag?

Put simply, a web tag is included in a Cumulus template file to indicate where Cumulus should insert values when it processes that template and produces an output file. A Cumulus Template File is the name given by Steve Loft to any files that contain web tags, and need to be processed before they actually include values.

The output file can be:

General Format for Web Tags

In the position in the file where Cumulus is to insert the relevant data, place a web tag in the general format specified here:

<#tag_name [optional input parameters][optional output parameters]>

Case sensitivity for tag names

The tag_name in the general format above is case sensitive, so please type the tag name exactly as shown in the web tag columns in the tables on the [Webtags|web tags page]].

What is a web tag parameter?

The parameters shown in the general format above are of two kinds:

  • Input modifying
  • Output modifying

These are explained below, after the warning on case sensitivity.

Case sensitivity for parameters

The optional input parameters always use lower case, so please type them exactly as shown in the sections dealing with input parameters on this page.

The optional output parameters are case insensitive when used in Cumulus 1. But for Cumulus 2 and later, so this includes MX, the output parameters are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully.

Input modification Parameters

Most web tags do not require any input parameters.

An input parameter is used where the same web tag can represent a value for a number of different past time instants. Each of those past time instants is represented by a different value for the input parameter. So a combination of web tag name and input parameter lets Cumulus to pick the value you want to see.

There are currently only two groups of tags where an input parameter is mandatory:

  1. The recent history tags where a separate value exists for potentially every individual minute in last week.
    • These tags need between one and three input parameters as explained in linked section.
      • To save you looking up the details, these input parameters specify how many minutes ago is required. To save entering a very large number for minutes, you can include separate input parameters for days, hours, and minutes, ago.
  2. The Webtags#Monthly_All_Time_Records where a separate value exists for each particular month (of any year).
    • These tags need an input parameter specifying which month.
    • To save you looking up the linked section, a single input parameter is needed (which is 1 for January to 12 for December, or 0 for current month).

Output modification parameters

  • A few web tags always need an output format specifier
  • Some web tags never use an output format specifier
  • The majority of web tags either can use an output format parameter, but they have a default output if there is no output format modifier.

This page does not tell you which web tags fall into each of the above 3 types.

To make life more complicated, the availability of output format parameters for particular web tags is dependent on which Cumulus release you are running. There is a general discussion about applicability, but that does not yet specify dependencies for individualweb tags.

The output modification options available, if you are using a MX release, include:

  • changing number of decimal places,
  • removing decimal commas, and
  • changing date and/or time format,

Each of these will be explained in turn.

Two Output (format modifier) parameters for decimal places

  • dp=i is used for both Cumulus 1 and MX.
    • The value i following the attribute dp is an integer, how many decimal places you want for the output you see.

There are restrictions on which web tags can use this output format modifier:

  • The legacy Cumulus allows use of dp=n modifier (where n represents desired number of decimal places for latitude and longitude e.g. <#latitude dp=5> gives "59.24250".
    • Modification of latitude and longitude is also available in MX.
  • MX makes much more usage of these dp parameters.
    • For example in the moon tags <#MoonPercent> and <#MoonPercentAbs>). Specifically, <#MoonAge> gives "11" but <#MoonAge dp=3> gives "11.234"
    • In later releases of MX, any tag that gives a decimal output, can use the "dp=n" modifier.
    • tc=y is a new parameter only in MX, the attribute tc takes the value 'y' to remove decimal places by truncation instead of using dp=0 which would round to nearest integer. e.g. <#MoonAge tc=y>. Later releases of MX implement this for any tag that by default outputs decimal places.

Output (format modifier) indicating remove commas

"rc=y" is a new parameter for MX, the attribute rc takes the value 'y' to replace any commas defined by the locale with full stops to separate integer and decimal parts of the output value. It was initially only implemented on a few new web tags (#MoonPercent, #MoonPercentAbs, #MoonAge) for MX versions up to and including 3.5.3. From version 3.6.6 only can all web tags that can output real numbers can now use alternative syntax of <#tag_name rc=y> to replace all commas in the output by a full stop (don't worry, MX does not use a comma for separating off thousands, so it is the decimal comma that becomes a decimal full stop like character when this remove comma specifier is used.


Why would you want to remove decimal commas? Well because the JavaScript language cannot understand decimal commas, and MX has several scripts written in this language, equally some third party alternative web pages rely on ajax to update them (and Ajax uses JavaScript).

Multiple Output Format Modifier parameters for times and dates

Time/Date format codes are used in two places:

  1. As part of report names for NOAA style reports (see this page for full details)
  2. As part of web-tags that report either times or dates, or report both a date and a time


These output format modifiers allow you to override the default display format for a particular web tag, using the format specifiers in the table below. The characters used to represent year, month, day, hour, minute, second, microsecond, and am/pm; all differ between C1 and MX.

Although, in theory, you can specify date formatting to times, and vice versa, this will not always yield a sensible result:

  • It is best to look at the default format (in most, but not all, cases this reveals whether date and time information are both available):
  • The time-stamps for today, and yesterday, only contain time information, so only time-based format instructions should be applied to them.
  • You can use date format parameters on (for example) <#metdate>, and <#metdateyesterday> and that may give you your desired date information to augment any time-stamps.
  • Almanac times such as sun-rise, moon-rise, are also only times, and time-based format instructions can generally be applied to them. However, be aware for some of your calendar days, the times may be reported (in default format) as '--' if for example the moon does not rise that day.
  1. You can choose whether 12-hour clock is used with am/pm, or the 24-hour clock is used.
  2. You can choose to include/exclude leading zero for hours.
  3. You can only report the hour if you don't care about the minutes, or only report the minutes if you don't need the hour.
  4. In most cases you can add seconds to the output, and in some cases either milliseconds or microseconds. This does not imply that Cumulus calculates everything every microsecond, in fact many are only calculated once a minute, but the flexibility is there for time outputs.

Time and date output modifiers in MX

These are available in all releases, and are case sensitive, so please see table for what is available. MX always has colon (':') between hour and minute numbers, but you can add seconds and microseconds by using output format modifiers. The "tt" modifier can be used to add "am/pm", but your locale settings will determine whether capital or lower case letters are output.

  • Cumulus MX (when running on Windows) uses the .NET software which is provided as standard by Microsoft Windows.
    • ".NET" was originally operating system independent, later only Microsoft Windows specific components were included, but since November 2020 ".Net" is used for an operating system independent version that originally Microsoft issued under another name!
    • (actually it is possible to install and run "Mono").
  • If Cumulus MX is running on Linux or Mac OS X, or any other device that uses an UNIX derived operating system, then MX uses Mono software for same purposes. (MONO is a operating system independent version of .NET, although they are developed independently, they have common origins).


  • For Cumulus MX there are standard format codes (single characters) and custom format codes (combinations of characters, or single characters prefixed by %)
  • In Cumulus MX the same character can have 4 different meanings depending on its case (capital letter or lower-case letter), and depending on whether it is on its own (standard format) or not (custom format)

Using HTML tags within format parameters (available in MX only)

Example using a class to change the look of part of the output

<#TapptempH format="dd' 'MMM' 'yyyy'<span class=\'xx\'> at 'HH:mm'</span>'">

the output from this will look like 04 Dec 2018 at 10:12

Note where the quotes are, and where you need to use '\' escape characters.

Example using HTML tags

<#RecentTS d=2 format="h:mm' 'tt'<small>on' d/M/yyyy'</small>'">

This puts the date in a smaller font than the time

Time and date output modifiers in legacy software

From version 1.9.1 most web-tags that report any form of time or date will accept an optional 'output format' parameter. The legacy Cumulus uses Delphi to interpret the output modifiers which is case-insensitive. Delphi has to use different letters, ignoring case, for each item. Consequently, most output formatting parameters are case insensitive, e.g. <#YearTempHT format=hh:nn>. However, in the legacy software, the case you use for any am/pm output format modifiers determines the case that is output.

For almanac web tags, these are calculated as at midnight GMT and so sunrise and sunset times will refer to different calendar days, and therefore the day-length parameters are (in places like UK) based on information for two different days! You cannot apply any parameters to day length tags.


The legacy cumulus (C1) can work with times using a full stop ('.') in the locale settings to separate the hour and minute figures (e.g. "14.26").

Some web tags contain dates, or both dates and times, and for these there is flexibility (apart from those with fixed format, these might have ISO, or another format indicator, in their tag name) as to how the date is output. Thus you can choose to include or exclude the year; you can represent month in letters or numbers, and you can vary the order in which elements of the date are shown.

In Cumulus 1 we are able to use "m" or "M" for two different meanings (minutes or month) depending on context. Similarly, in MX the same character sometimes has two different meanings depending on context, but this applies to lots of characters and the context is whether the character is used on its own or with other characters. Sounds confusing? Well it is complicated.

Migrating from legacy to MX

If you use NOAA type report functionality, and choose to transfer your existing existing configuration file (cumulus.ini) to MX, you need to be concerned about how to represent a month.

If you have created any Cumulus template files, then every place in each template, where an output modifiers is used to specify a date and/or time format, has to be edited. For web tags it is much more complicated, simply because it is not just month we may be representing, and we might require only one specifier (being careful whether we use a standard or custom modifier) or we might want to specify a combination of modifiers (and we might want to add a space character or other literals). It is difficult to summarise, but here are some potential issues:

  • the reserved characters are different in C1 and MX (affecting use of literals like "on" and "at" that appear in many English time-stamps)
  • MX introduces the concept of escaping characters (a \ placed before a character can be either a control sequence or an instruction to display the character)
  • MX is inconsistent e.g. format=d gives a different result depending on the tag it is applied to (e.g. the script conditional '<#metdateyesterday format=d>' == '<#yesterday format=d)>' will never be equal as the LHS returns a full date and the right hand side returns day of month only)
  • in MX space in some cases may need to be within the single quotes containing other literals (as in MX space can change the interpretation of a modifier character).

Confused even more now? I'm not surprised, but maybe some examples will help before we actually list the available modifiers.

Examples

  • Examples related to case selection
    1. Badge v1.png In Delphi, "nn" means "minutes" for Cumulus 1, Badge vMx.pngbut "minutes" is "mm" for .NET or MONO in Cumulus MX.
    2. The hour in 24-hour format with leading zero, in non case sensitive Delphi (Cumulus 1) 'HH' or 'hh' would be treated as same, but in .NET or MONO it must be "HH" (Cumulus MX).
    3. The hour in 24-hour format without leading zero, in non case sensitive Delphi (Cumulus 1) 'H' or 'h' would be treated as same, but in .NET or MONO it must be "%H" (Cumulus MX).
    4. For 12-hour specifiers, please see the table, as this is far more complicated.
  • Badge vMx.pngYou might be put off by references within .NET and MONO (Cumulus MX) to single/standard characters and custom modifiers, the following 3 examples may add clarity:
    1. For example, <#MonthTempHD format="d"> is a single character format modifier, therefore the 'd' acts as a standard modifier, and causes for a date of 22 July 2014 for the highest temperature in the month to be returned in the standard short date format e.g. '22/07/2014' (exact contents for any one date vary by locale).
    2. Similarly, <#MonthTempHD format="M"> is a single character format modifier and therefore the 'M' acts as a standard modifier and causes the date for the highest temperature in the month to be returned in the standard day and month format e.g. '22 July' (exact contents for any one date vary by locale).
    3. Whilst <#metdate format="d M"> is not a single character format modifier and therefore both the 'd' and the 'M' are interpreted as custom modifiers and cause the current date to be returned as a digit(s) for the day and a digit(s) month (in a without leading zeroes format) e.g. '6 7' would be returned for 6 July.
    4. Alternatively, <#MonthTempHD format="%d"> is NOT a single character format modifier, therefore the 'd' acts as a custom modifier, and causes a date of 22 July 2014 for the highest temperature in the month to be returned as the day of the month only '22' in all locales.
    5. Similarly, <#MonthTempHD format="%M"> is NOT a single character format modifier and therefore the 'M' acts as a custom modifier and causes the same date for the highest temperature in the month to be returned as the month number '7'.

In both Cumulus 1 and MX if you want a space character within your output, the output specifiers must be enclosed in double quotes. If that space character is next to a non modifier (e.g. around word "at") then the single quote needing to surround the at should be widened to include the spaces in MX, but Cumulus 1 does not care if single quotes excluded spaces. However, with MX, single quotes enclose multiple characters, but there is an alternative way to deal with some single verbatim characters to cover next.

So let us compare these two alternative ways that MONO and .NET escape any characters that are not being used as format specifiers.

  • In Badge v1.pngDelphi you can put the 'verbatim' characters inside single quotes (Cumulus 1); this is often used to (in English) include words like ' on ' and ' at ' in the formatted output.
  • in Badge vMx.png.NET or MONO you can still use single quotes (as mentioned above extended to include adjacent spaces),
    • but alternatively you can escape each verbatim character with a backslash as prefix (Cumulus MX).
  • You may need to use both single quotes and back slashes in some format specifiers, depending whether the characters you want to include can be interpreted as control characters (yes, backslash is also used to escape control characters, so backslash will NOT work for some characters such as those in "on" and "at" [\n will produce new line not the letter n, \t will produce a tab not the letter t]), consequently for some characters you must use the literal approach to include them in your format.

List of allowed modifiers for output format parameters

Note for Cumulus 1 - where lower (or upper, for easier comparison with MX) case shown, because Delphi is case insensitive, upper (or lower) case (in some cases, indicated by use of curved brackets) could be used instead (exceptions: a/p, ampm, am/pm, Am/Pm, AM/PM, A/P, AMPM etc display as input).

Badge vMx.pngRemember that most single character format specifiers have a different meaning to when the same letter appears in a multi-character format. The % shown in front of nearly every single character specifier in the table is not needed if that character is combined with other characters.

Forum reference

Steve Loft published a table showing comparison between output date modifiers for Cumulus 1 and MX at Cumulus MX forum. The table there was based on the table that was originally here for just Cumulus 1.

The subsequent comments in the forum suggested his layout got people confused. Most of that confusion came in two circumstances:

  • When someone wanted to use one date or time modifier on its own
  • When someone who had been using Cumulus 1 swapped to MX and wanted to replace a combination of output modifier characters

That all comes from the fact that when a MX modifier consists of a single character it can mean something different to when it appears with other characters. In Cumulus 1, "m" or "M" meant something different when it was combined with "H" or "h" (when it represented minutes), but in all other contexts it represented month. But for Cumulus 1, there is no other case where it matters what context a modifier is put in by the use of other modifiers, and no other modifier takes more than one meaning.

In MX it is much more complicated, to take a few examples "D", "H", "M" represent different items on their own to what they represent when combined with other characters. That other character can be as simple as a space or a "%" which modify the meaning of the character. So my modification of the table below is with the intention of demonstrating what characters mean when they are on their own and what they represent in the context of being with other characters. Looking at the table you can see "G" is used on its own because it represents a full date-time specifier. "D" is similarly used on its own represents the long date format. If we only want the day of month number we must use "%d" to avoid the meaning of short date format that "d" on its own represents. If we want the typical Cumulus date-stamp of day of month number and month "d M" and "M" will both work because "M" has a different meaning on its own and with another modifier.

My Revised Table of Time and Date Output Modifiers

In some rows of this table, square brackets [] indicate optional items, they are included just to make it clearer how items can be combined in a single output parameter.

Cumulus Version 1 SpecificDelphi Specifier for Cumulus 1.9.x Badge vMx.pngMono/.NET Specifier for Cumulus MX Displays Example
c 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. '22/03/2019 09:47:25' produced by Cumulus Version 1 Specific<#time format=c>Badge vMx.png<#time format=G>
d %d Displays the day as a number without a leading zero (1-31). Badge vMx.pngNote that Cumulus MX requires a ' ' (space), '%' or other modifier to be included, as 'd' on its own returns full 'short date'). 27 produced by Cumulus Version 1 Specific<#metdate format="d">Badge vMx.png<#metdate format="%d">
dd dd Displays the day as a number with a leading zero (01-31). 07 produced by <#metdate format="dd">
ddd ddd Displays the day as an abbreviation (Sun-Sat) using the strings appropriate to the Locale. 'Wed' produced by <#metdate format="ddd"> (English locale)
dddd dddd Displays the day as a full name (Sunday-Saturday) using the strings appropriate to the Locale. 'Friday' produced by <#metdate format="dddd"> (English locale)
ddddd d (as single character format) Cumulus Version 1 SpecificCumulus 1.x.y: Displays the date using the format given by the Short Date format. Badge vMx.pngThis MX parameter (when on its own) displays inconsistent behaviour as its effect depends on the tag name with which it is used (see examples). e.g. '22/03/2019' (British Locale) produced by Cumulus Version 1 Specific<#metdate format=dddd>

Badge vMx.png<#metdateyesterday format=d> but not <#yesterday=d> which would return just '22'

dddddd D (as single character format) Displays the date using the format given by the Long Date format. Badge vMx.pngThe MX parameter cannot be combined with any other parameters. e.g. '22 March 2020' (British Locale)
M (or m) %M Displays the month as a number without a leading zero (1-12).
  • Cumulus Version 1 SpecificCumulus 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.
  • Badge vMx.pngCumulus 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 Displays the month as a number with a leading zero (01-12).
  • Cumulus Version 1 SpecificCumulus 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 Displays the month as an abbreviation (Jan-Dec) using the strings appropriate to the Locale.produced by <#metdate format="MM"> 'Jun' produced by <#metdate format="MMM"> (English locale)
MMMM (or mmmm) MMMM Displays the month as a full name (January-December) using the strings appropriate to the Locale. 'June' produced by <#metdate format="MMMM"> (English locale)
yy yy Displays the year as a two-digit number (00-99). 19 produced by <#LastDataReadT format=yy>
yyyy yyyy Displays the year as a four-digit number (0000-9999). 2019 produced by <#LastDataReadT format=yyyy>
h [AM/PM] %h [tt] 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).

Cumulus Version 1 SpecificFor Cumulus 1 the formats for am/pm depend on the case in which you type the parameter as shown later in this table

Badge vMx.pngNote 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 [tt] Displays the hour (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].

Cumulus Version 1 SpecificFor Cumulus 1, the minutes can be represented by 'mm' only when appearing in combination with 'h'

'10:27 am' produced by Cumulus Version 1 Specific <#LastDataReadT format="h:nn am/pm">Badge vMx.png <#LastDataReadT format="h:mm tt">
H (or H) %H Displays the hour using 24 hour clock without a leading zero (0-23). Badge vMx.pngNote that including a ' ' (space) or '%' before the "H" makes it a custom modifier, needed because H is on its own. 7 produced by Cumulus Version 1 Specific<#daylength format=H>

Badge vMx.png<#daylength format=%H>

H:mm (or H:nn) H:mm Displays the hour using 24 hour clock without a leading zero (0-23) followed by 2 digit minutes. Badge vMx.pngNote that %, of previous example, is not needed when H is not on its own. '7:27' produced by <#LastDataReadT format="H:mm">
HH (or hh) HH Displays the hour using 24 hour clock with a leading zero (00-23). '06' or 19 produced by <#LastDataReadT format=HH>
hh (am/pm) hh [tt] Displays the hour (12 hour clock) with a leading zero (01-12) [optionally in combination with am/pm].

Cumulus Version 1 SpecificFor Cumulus 1 the case output for the optional 'am/pm' depends on the case used for that parameter as shown later in this table 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

'07 am' produced by Cumulus Version 1 Specific <#LastDataReadT format="hh am/pm">Badge vMx.png <#LastDataReadT format="hh tt">
hh:mm (or hh:nn or 'HH:NN') [am/pm] 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].

Cumulus Version 1 SpecificFor 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. 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 Cumulus Version 1 Specific <#LastDataReadT format="h:nn am/pm">Badge vMx.png <#LastDataReadT format="h:mm tt">
n %m Displays the minute without a leading zero (0-59). Badge vMx.png As other examples show, the % is only needed when "m" is on its own. 7 produced by Cumulus Version 1 Specific<#daylength format=n>Badge vMx.png<#daylength format=m>
nn mm Displays the minute with a leading zero (00-59). '07' produced by Cumulus Version 1 Specific<#daylength format=nn>Badge vMx.png<#daylength format=mm>
s %s Displays the second without a leading zero (0-59). 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
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: 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.

(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 in some versions of Windows only has precision to 15 ms, so requesting thousandths of a second may not return anything useful.

Badge vMx.pngThe 'fff' modifier in MX can actually be extended to 'ffffff' for output to a millionth of a second!

09:47:25.000' produced by Cumulus Version 1 Specific<#time format=hh:nn:ss.zzz>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) %K Effectively another way of including time zone as per zzz example, but it can only be used for times not in UTC (if I understand correctly)
t %t Displays the time using the Short Time format. Badge vMx.pngRemember 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
TT T (as single character format) Displays the time using the Long Time format. 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 Cumulus Version 1 Specific<#LastDataReadT format=TT> Badge vMx.png<#LastDataReadT format=T>
am/pm or Am/Pm or AM/PM tt Cumulus Version 1 SpecificUses 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.

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>
h a/p 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.

{{Version badge 1} The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

Badge vMx.pngwhether 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.

{{Version badge 1}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. '/' for typical British locale
: : Displays the time separator character given by the Time Separator. With Cumulus 1, this might not display a colon.

Badge vMx.pngNote that by default Cumulus MX expects a locale to use ":" for any time separator.

':' for British locale
'xy' 'xy' or \x\y Characters enclosed in single quotation marks are displayed as such, and do not affect formatting.

Badge vMx.pngIn 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">'


Additional text in output format parameters

You should put anything that is additional, to the defined format modifier specification below, into single quotation marks to prevent it being interpreted as a date or time format modifier:

  1. For example, the word "on" contains the character "n", which for Cumulus versions 1.9.1 to 1.9.4 will be interpreted as a time format modifier unless you put it into single quotation marks. Example of valid Cumulus 1 syntax: <#TtempH format="'at' hh: mm 'on' dd / mm / yyyy">.
  2. You can include HTML tags (but they cannot have any attributes because both single and double quote characters have defined meanings) and special characters as quoted text within the 'format' parameter.
    Example of valid syntax: <#TapptempH format="'at 'h:nn' 'am/pm '<small>on' d/m/yyyy'</small>'">.

Cumulus Version 1 SpecificNote for Cumulus 1 - if your format has any spaces in it, you must enclose the whole format parameter value in double quotes, for example (Cumulus 1.9.x): <#YearTempHT format="hh nn">. Consequently, you cannot include double quote characters in any other position (see here for work-around).

Badge vMx.pngNote for MX - you can use single quotation marks round spaces and text (e.g. ' on '), but you can also use '\' as escape character (e.g. for 'on' use \o\n). However for 'at' the only alternative is \a't' because the character t has another meaning and escape followed by a "t" i.e. "\t" becomes a tab!