Sandaysoft

Support forum for Cumulus weather station software
It is currently Tue May 21, 2013 5:51 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 1:55 pm 
Offline

Joined: Sun Jul 17, 2011 5:15 pm
Posts: 76
Location: Canary Islands, Spain
Weather Station: Davis Vantage Pro2 Plus
Operating System: WXPSP3, W7Home
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.


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 2:21 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
ajcm wrote:
I would like to know how to format "format = hh: mm"

<# ByMonthTempHT mon=1 format="hh: nn">
Quote:
and "format = dd/ mm/yyyy".

<# ByMonthTempHT mon=1 format="dd/ mm/yyyy">
Quote:
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
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 5:20 pm 
Offline

Joined: Sun Jul 17, 2011 5:15 pm
Posts: 76
Location: Canary Islands, Spain
Weather Station: Davis Vantage Pro2 Plus
Operating System: WXPSP3, W7Home
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?


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 5:24 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
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
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 5:28 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
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
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 5:53 pm 
Offline

Joined: Sun Jul 17, 2011 5:15 pm
Posts: 76
Location: Canary Islands, Spain
Weather Station: Davis Vantage Pro2 Plus
Operating System: WXPSP3, W7Home
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.


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 6:01 pm 
Offline

Joined: Sun Jul 17, 2011 5:15 pm
Posts: 76
Location: Canary Islands, Spain
Weather Station: Davis Vantage Pro2 Plus
Operating System: WXPSP3, W7Home
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.


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 6:52 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
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
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 7:21 pm 
Offline

Joined: Sun Jul 17, 2011 5:15 pm
Posts: 76
Location: Canary Islands, Spain
Weather Station: Davis Vantage Pro2 Plus
Operating System: WXPSP3, W7Home
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.


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 8:16 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17564
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
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.

Quote:
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
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: monthlyrecordT: how to change the date and time format.
PostPosted: Sun Apr 15, 2012 9:55 pm 
Offline

Joined: Sun Jul 17, 2011 5:15 pm
Posts: 76
Location: Canary Islands, Spain
Weather Station: Davis Vantage Pro2 Plus
Operating System: WXPSP3, W7Home
Ok, Steve, I'll try when I have time these days.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group