Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
m (→‎List of allowed modifiers: Added % in front of H on its own)
(3 intermediate revisions by the same user not shown)
 
== Differences between Cumulus 1 and Cumulus MX (Cumulus 3): ==
*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.
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.
*#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.
=== Output (format modifier) parameters for decimal places ===
*# e.g. the hour in 24-hour format, is "HHhh" (although in Delphi (Cumulus 1)'hhHH' would be treated same) butin Delphi (Cumulus 1) and in .NETNet it must be "HH" (Cumulus MX).
"dp=" is used for both Cumulus 1 and MX.
*[[File:Badge vMx.png]]You might be put off by references withinfor .NETNet (Cumulus MX) to single/standard characters and custom modifiers, the following 3 examples may add clarity:
 
=== 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]].NETNet 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=3927&t=1788812908 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 ===
|h (''am/pm'')
|h [''tt'']
|Displays the hour (12 hour clock) without a leading zero (1-12) followed by 2 digit minutes [optionally in combination with am/pm]. For Cumulus 1 there are other formats for am/pm shown later in this table
|-
|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]. For Cumulus 1 there are other formats for am/pm shown later in this table
|-
|H
|%H
|Displays the hour using 24 hour clock without a leading zero (0-23). Note that % is only needed when H is on its own.
|-
|H:nn
|H:mm
|Displays the hour using 24 hour clock without a leading zero (0-23) followed by 2 digit minutes. Note that % is not needed when H is not on its own.
|-
|hh (''am/pm'')
|Displays the hour (12 hour clock) with a leading zero (01-12) [optionally in combination with am/pm]. For Cumulus 1 there are other formats for am/pm shown later in this table
|-
|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]. For Cumulus 1 there are other formats for am/pm shown later in this table
|-
|HH (or ''hh'')
5,838

edits

Navigation menu