5,838
edits
m (→Davis: storm rain) |
m (→Time/Date 'format' Parameter: Making clear Cumulus 1 only and mentioning Almanac times) |
||
|
=Time/Date 'format' Parameter=
From version 1.9.1 most time
This allows you to override the default display format for that item, using the format specifiers in the table below.
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. For example the time-stamps for today and yesterday only contain time information, so only time-based format instructions should be applied to them.▼
▲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
*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 the 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 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.
'''Differences between Cumulus 1 and Cumulus MX (Cumulus 3):'''
*Cumulus MX uses the .NET date and time format characters that are not exactly the same as the Delphi ones
*#For example, in Delphi, "nn" means "minutes" for Cumulus 1, but "minutes" is "mm" for .Net in Cumulus MX.
*# e.g. the hour in 24-hour format, is "hh" in Delphi (Cumulus 1) and in .Net it's "HH" (Cumulus MX).
*The other change with the "format" parameter is the different way that .Net escapes characters
'''The Rest of this section applies only to Cumulus versions 1.9.1 to 1.9.4'''▼
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:
#For example, the word "on" contains the character "n", which will be interpreted as a time format modifier unless you put it into single quotation marks. Example of valid syntax: <#TtempH format="'at' hh: mm 'on' dd / mm / yyyy">.
▲*The other change with the "format" parameter is the different way that .Net escapes characters which are not to used as format specifiers. In Delphi you put the 'verbatim' characters inside single quotes; in .Net you escape each verbatim character with backslashes.
▲'''The Rest of this section applies only to Cumulus 1'''
'''Note that if your format has any spaces in it''', you must enclose the whole format parameter value in double quotes, for example: <#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]]).
▲You should put anything which is not intended to be part of the date and time formatting into single quotation marks to prevent it being interpreted as a date or time formatter. For example, the word "on" contains the character "n", which will be interpreted as a time formatter unless you put it into single quotation marks. Example: <#TtempH format="'at' hh: mm 'on' dd / mm / yyyy">. 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: <#TapptempH format="'at 'h:nn' 'am/pm '<small>on' d/m/yyyy'</small>'">.
{| class="wikitable" border="1"
|-
!style="width:150px" | Delphi Specifier
!style="width:600px" | Displays
|-
| |||
edits