Webtags (preserving history): Difference between revisions

m
Line 304: Line 304:


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).
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).
=== Output (format modifier) parameters for times and dates ===
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 web-tags that report either times or dates or both a date and a time
From version 1.9.1 most web-tags  that report any form of time or date will accept an optional 'format' parameter, e.g. (Cumulus 1 only): <#YearTempHT format=hh:nn>.
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 (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 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.


=== Additional text in output format partameters ===
=== Additional text in output format partameters ===
5,838

edits