Webtags (preserving history): Difference between revisions

m
Line 55: Line 55:
There is a page that details the [[BETA webtags|additional webtags]] available in any Cumulus Beta version that is currently under development. The same page is being used to show new web tag features as MX is being developed.
There is a page that details the [[BETA webtags|additional webtags]] available in any Cumulus Beta version that is currently under development. The same page is being used to show new web tag features as MX is being developed.


=Time/Date 'format' Parameter=
=Output 'format' Parameter=
=== Output (format modifier) parameters for decimal places ===
"dp=" is used for both Cumulus 1 and MX.
 
=== Output (format modifier) parameters for times and dates ===
Time/Date format codes are used in two places:
Time/Date format codes are used in two places:
# As part of report names for NOAA style reports (see [[Cumulus.ini#Section:_NOAA]])
# As part of report names for NOAA style reports (see [[Cumulus.ini#Section:_NOAA]])
Line 67: Line 71:
*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 these are calculated as at midnight GMT and 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.
*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 these are calculated as at midnight GMT and 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.


== Additional text ==
=== Additional text ===


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:
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:
Line 75: Line 79:


'''Note 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 [[Php_webtags#Web_tag_Complications| here for work-around]]).
'''Note 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 [[Php_webtags#Web_tag_Complications| here for work-around]]).
== Differences between Cumulus 1 and Cumulus MX (Cumulus 3): ==
All web tag_names are identical in both flavours, but not all web tags are available in both. All input parameters are the same (see [[#Recent_History|Recent History]]), but output parameters do vary between Cumulus 1 and MX.
=== Output (format modifier) parameters for decimal places ===
"dp=" is used for both Cumulus 1 and MX.
=== Output (format modifier) parameters for times and dates ===
*Cumulus MX (when running on Windows) uses the '''.NET''' date and time format characters that are not exactly the same as the '''Delphi''' ones that Cumulus 1 uses.  For Cumulus MX see [http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx this Microsoft site] for format selectors. The differences come about because Delphi is case-insensitive, and .Net is case sensitive, so .Net can use upper and lower case for different items, where Delphi has to use different letters. If Cumulus MX is running on Linux or Mac OS X, then it uses '''Mono''' for date and time formatting, but the same case sensitive rules apply as for .NET.
*#For example,[[File:badge v1.png]] in Delphi, "nn" means "minutes" for Cumulus 1, [[File:Badge vMx.png]]but "minutes" is "mm" for .Net in Cumulus MX.
*# e.g. the hour in 24-hour format, is "HH" (although in Delphi (Cumulus 1)'hh' would be treated same) but in .NET it must be "HH" (Cumulus MX).
*[[File:Badge vMx.png]]You might be put off by references within .NET (Cumulus MX) to single/standard characters and custom modifiers, the following 3 examples may add clarity:
*#For example ''<#MonthTempHD format="d">'' is a single character format modifier, therefore the 'd' acts as a standard modifier, and causes 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).
*#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).
*#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.
*The other change with the "format" parameter is the different way that .Net escapes characters that are not being used as format specifiers. In [[File:badge v1.png]]Delphi you can put the 'verbatim' characters inside single quotes (Cumulus 1); in [[File:Badge vMx.png]].NET you can still use single quotes, but alternatively you can escape each verbatim character with a backslash as prefix (Cumulus MX).
For official full details see [https://cumulus.hosiene.co.uk/viewtopic.php?f=39&t=17888 Cumulus MX forum], the following table is revised for simplicity. (I've abridged the table here and included '%' where necessary to avoid single character versus custom complications).


=== List of allowed modifiers ===
=== List of allowed modifiers ===
5,838

edits