Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.7.0 (build 3089) - 28 July 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this link to Download the Software (Cumulus MX / Cumulus 1 and other related items). Software

monthlyrecordT: how to change the date and time format.

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
ajcm
Posts: 111
Joined: Sun 17 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: W7 Home Premium 64bits
Location: Maspalomas, Canary Islands, Spain
Contact:

monthlyrecordT: how to change the date and time format.

Post by ajcm »

Hello:

It has arisen a new problem for me with the new template "monthlyrecordT" because the month name is in Spanish because it takes the data from windows system.

For example:
In the template "thismonthT" the date format was "<# MonthTempHT> on <# MonthTempHD>"
- http://acanmet.com/GC100/thismonth.htm and replace with "<# MonthTempHT format = hh: mm> on <# MonthTempHD format = dd / mm / yyyy> ", but now the problem is that the format is" <# ByMonthTempHT mon = 1> ".
- http://acanmet.com/GC100/monthlyrecord.htm
I would like to know how to format "format = hh: mm" and "format = dd/ mm/yyyy".

And because of this post you commented on the subject of that from precipitation of 1 mm is considered wet day and less than 1 mm is dry, it appears that on April 8th day it rained 4.4 mm, then this day should have been put to 0 the days of drought but it is still counting and today April 15th is now in 361 Days Since It Last Rained. Let's see if I can say something about it.

Thank you very much and I hope your answer.

User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by steve »

ajcm wrote:I would like to know how to format "format = hh: mm"
<# ByMonthTempHT mon=1 format="hh: nn">
and "format = dd/ mm/yyyy".
<# ByMonthTempHT mon=1 format="dd/ mm/yyyy">
And because of this post you commented on the subject of that from precipitation of 1 mm is considered wet day and less than 1 mm is dry, it appears that on April 8th day it rained 4.4 mm, then this day should have been put to 0 the days of drought but it is still counting and today April 15th is now in 361 Days Since It Last Rained.
It uses 0.2 mm by default, not 1 mm, or whatever you've set it to if you've set it. If you zip up the diags folder, dayfile.txt, and today.ini and attach them, I'll take a look.
Steve

ajcm
Posts: 111
Joined: Sun 17 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: W7 Home Premium 64bits
Location: Maspalomas, Canary Islands, Spain
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by ajcm »

I change format here:

<tr class="td_temperature_data">
<td class="main_table_text_labels">Highest&nbsp;Temperature</td>
<td class="right_align_indented"><span id=TempH><#ByMonthTempH mon=1></span>&nbsp;<#tempunit></td>
<td class="right_align_indented"><span id=TempHT>at <#ByMonthTempHT mon=1 format="hh:mm"> on <#ByMonthTempHT mon=1 format="dd/mm/yyyy">

But if you click up on the monthnames it appears as before. I think that it must change here:

var hightempT = new Array("<#ByMonthTempHT mon=1>","<#ByMonthTempHT mon=2>","<#ByMonthTempHT mon=3>","<#ByMonthTempHT mon=4>","<#ByMonthTempHT mon=5>".....................................

But must I change every data, one and one?

anyway do not think I just leave well: " at 14:10 on 12/01/2004 "

I really do not want this format "hh:mm dd/mm/yyyy", what I want is for me to appear in English not Spanish. No other way?

User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by steve »

ajcm wrote:But must I change every data, one and one?
Yes; see the other thread where all of this has been discussed. You have to specify the parameter each time you use a web tag.
Steve

User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by steve »

ajcm wrote:what I want is for me to appear in English not Spanish. No other way?
I can't win. I get people complaining that Cumulus is only in English, so I try to make it work in their own language and I still get complaints. More options needed, I guess.

Use the "monthnames" array and a web tag with format=m to index it - like the code that sets "Records for the month of..."
Steve

ajcm
Posts: 111
Joined: Sun 17 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: W7 Home Premium 64bits
Location: Maspalomas, Canary Islands, Spain
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by ajcm »

Ok, sorry, I understand perfectly but I demand nothing I myself am content to leave it in the English language that is international. I always think that a program will work most perfect in the language of the factories that if you change the language then you can run worse.

ajcm
Posts: 111
Joined: Sun 17 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: W7 Home Premium 64bits
Location: Maspalomas, Canary Islands, Spain
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by ajcm »

steve wrote: Use the "monthnames" array and a web tag with format=m to index it - like the code that sets "Records for the month of..."
You mean to put a format here?

var monthnames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

If but where and how.

User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by steve »

Create a <span id=HTMonthName> and set it to monthnames[month] in the changeData function:

document.getElementById('HTMonthName').innerHTML = monthnames[month];

Set the other parts of the date using format parameters with <#ByMonthTempHT...
Steve

ajcm
Posts: 111
Joined: Sun 17 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: W7 Home Premium 64bits
Location: Maspalomas, Canary Islands, Spain
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by ajcm »

I change this:

function changeData(month) {
document.getElementById('MonthName').innerHTML = monthnames[month];
document.getElementById('HTMonthName').innerHTML = monthnames[month];
document.getElementById('TempH').innerHTML = hightemp[month];

<caption>Records for the month of <span id=HTMonthName>January</span></caption>

The months don´t move.

Do not worry anymore because I do not know html programming and do not want to waste anymore of your time.

Thanks Steve.

User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by steve »

But you've changed the ID of the one that gets changed anyway, so it has no effect. You need to do the same thing for the other dates, where you currently get "enero" - in the table itself, not the caption.
Do not worry anymore because I do not know html programming
This is really javascript rather than html, and I don't know much of either of those, but I like to learn. I had to learn a few things to create the monthlyrecordT.htm template in the first place.
Steve

ajcm
Posts: 111
Joined: Sun 17 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: W7 Home Premium 64bits
Location: Maspalomas, Canary Islands, Spain
Contact:

Re: monthlyrecordT: how to change the date and time format.

Post by ajcm »

Ok, Steve, I'll try when I have time these days.

Post Reply