Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Web Tag short month format

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
billy
Posts: 255
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi bullseye
Location: Gooseberry Hill, Western Australia

Web Tag short month format

Post by billy »

<#StormRainStart format="%d MMM"> produces "11 Apr." (at least today).

I don't want the full stop / period.

All other web tags with a date (that I use) produce the full stop when formatted with MMM - at least in my hands.

I can massage the output to get rid of it, but all documentation about MMM that I have read does not show a full stop in the example output. So what am I missing?
User avatar
HansR
Posts: 5953
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Web Tag short month format

Post by HansR »

It's the locale setting which does that.
Either Mark has to remove those points consistently throughout CMX or you have to 'massage the output to get rid of it'.

This is an endless discussion about abbreviated month name which pops up whenever those documentation (without a point) is used against reality where a lot of locales do add a point (everybody but en-GB is seems). There are also many datafiles which have points in the name but they have been removed there about 2 years ago. If you want to access old data, you have to rename those datafiles without the point so apr.21log.txt should become apr21log.txt and note that it also depends on your locale whether the name starts with a capital or not (e.g. nl-NL has apr21log.txt but en-GB has Apr21log.txt

Choosing the month name based on the locale (and use the locale for many more things) ah well... that's life.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Web Tag short month format

Post by sfws »

The original Wiki documentation at https://cumuluswiki.org/a/Webtags as created by David Jamieson and edited by Mark Crossley and Steve Loft, did make it clear that "MMM" would output the Short Month Format, and that was determined by Language settings for your locale.

When that was written, only the original Cumulus was available, and that ran only on Microsoft Windows. Working with Steve Loft, I did edit the page to cover his MX 3.0.0 beta. That was when I redesigned the big table to have separate columns for 1.9.4 and 3.0.0, plus a column for examples. I explicitly said they were British locale examples.

However, when Mark Crossley took over MX development, so much changed on web tags (both new tags and new parameters) that the page became a bit of a mess. . Mark (and others) did make a few amendments to the page to cover some new tags, but I gave up tracking the effects of release announcements in June 2020.
billy wrote: Sun 11 Apr 2021 4:43 am <#StormRainStart format="%d MMM"> produces "11 Apr." (at least today).

I don't want the full stop / period.

All other web tags with a date (that I use) produce the full stop when formatted with MMM - at least in my hands.

I can massage the output to get rid of it, but all documentation about MMM that I have read does not show a full stop in the example output. So what am I missing?
Some people will have noticed that after Ken True gave me administrative access to the Wiki, I have found some odd moments to make great strides in restructuring it, (hoping that will make it easier for others to update it). Two of my objectives were:
1) To start the separation of pages for MX and pages for legacy Cumulus, to make it easier for users who have interest in only one flavour
2) To break large pages up into smaller pages (by taking the text off line, and reorganising it, before pasting it back into Wiki)

It happens that I took the "webtags" page text offline a while ago, and have been restructuring it over recent months. The replacement 3 smaller pages ( I will leave readers to go and see the 3 replacement pages) have been recently pasted back into the Wiki. In terms of the new parameters page, the text that has now been pasted into place has a totally new, and hopefully much better layout, to explain all the parameters.

You will see Webtags/ parameters does explain the locale issues better, as a response to previous discussion in the forum on this issue, but it happens it has proved to be anticipating your question. EDIT: Updated link
Last edited by sfws on Mon 12 Apr 2021 1:26 pm, edited 2 times in total.
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Web Tag short month format

Post by mcrossley »

As has been explained it is outside my control what is produced.

But if your rPi is dedicated to CMX, then you could consider changing your locale to one that is similar but does not use the short month names with periods.

If you switched from English Australian to English GB for instance, the currency symbols would be wrong (not a concern for CMX!), but every thing else would be pretty much the same I think? You could test it by running CMX with the language parameter... -lang en-GB
User avatar
billy
Posts: 255
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi bullseye
Location: Gooseberry Hill, Western Australia

Re: Web Tag short month format

Post by billy »

well thanks to all three of you for your responses that clarify the issue(s) - there's nothing like a bit of history to put things into perspective!

I hadn't given any thought to the possibility that GB and AU would behave differently with respect to full stops terminating abbreviations. Although I was, I shouldn't have been be surprised - conventions are ever-changing and vary over short time frames and distances (eg Oxford vs Cambridge wrt "ize" and "ise"). I was just looking for a simple clean style and saw the full stop working against this without having any negative impact on readibility. Anyhow, I have learnt from developing my website that php is my friend - in this case functions substr() and strpos() :)

@sfws the link doesn't seem to work
sfws wrote: Sun 11 Apr 2021 1:59 pm You will see https://cumuluswiki.org/a/Web_Tag_Param ... th_formats does explain the locale issues better, as a response to previous discussion in the forum on this issue, but it happens it has proved to be anticipating your question.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Web Tag short month format

Post by sfws »

billy wrote: Mon 12 Apr 2021 10:42 am php is my friend - in this case functions substr() and strpos()
Don't forget that strpos(haystack,needle, position) is more efficient than substr(haystack,needle,position, length) for use in any conditionals like looking for full stops.
billy wrote: Mon 12 Apr 2021 10:42 am @sfws the link doesn't seem to work
The link is in my earlier post works now.

I'm not the Wiki (or indeed general computing) expert that some people seem to believe.
I tried to make my new parameter page, appear as a sub-page of the main webtags page.
By using hierarchy, in the same way that Editing appears as a sub-page of Help:Contents

Freddie - Is my page naming still wrong in the Wiki? If it needs correction, then there are various links to update (one on "main page" of wiki and multiple links in "Webtags" page, as well as now twice in this thread).
freddie
Posts: 2471
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Web Tag short month format

Post by freddie »

sfws wrote: Mon 12 Apr 2021 11:15 am Freddie - Is my page naming still wrong in the Wiki? If it needs correction, then there are various links to update (one on "main page" of wiki and multiple links in "Webtags" page, as well as now twice in this thread).
I don't know, as I'm not a Wiki expert either. Following your link, I get a message that the page has been deleted and there is no redirect to forward the user to. Perhaps ask the owner of the Wiki? I forget his username just now.
Freddie
Image
Post Reply