EDIT: Actually I’m not sure it is 100% sorted. The red sector now changes over time as expected, but doesn’t seem to be in the right place. Maybe it’s due to an error in the tag calculation as Brian mentioned earlier…
Off topic, but as an optometrist I love your avatar!
The clientrawlocal.txt with the changed tags can be downloaded form my site. I will add changes with the date in the description above.
A good idea, i hope to have a new download ready soon with a gauges.js with solar and additions for the lastraintipISO.
And you need to download the latest zip update from r14 for working wind direction tags.
I notice in "gauges-ssT.htm that a CSS file named “weatherstyle.css” is called. I didn’t find
that in the distribution; do I need it and, if so, where would I obtain it?
I noticed with my time of last rain tag wasn’t producing a time but I changed it to time of last rain allways and I get 5:50 AM. My date of last rain produces 2/17/2012 but when I rollover the gauge I get Last Rain: 1 Nov 5:50
I think I see a problem with the last rain date/time. Can WD produce a fixed date format for the tags, or does it vary depending on the stations locale settings? The script assumes it will be in ISO date/time format for Cumulus (yyyy-mm-dd hh:mi) but if WD produces dates in dd/mm/yyyy or mm/dd/yyyy do you normally have to specify the date format in the script and user changes it at deployment?
It is always fixed with two tags, however there is a small bug in the time part (there’s a leading space in front), so the rain tags have to be placed without a space between them.
Is already said in this topic.
I believe the date is setup by the local settings. dd/mm/yyyy in Europe and mm/dd/yyyy in USA. I’m not sure if WD can do the date with the ISO format. Brian would have to answer this.
Just download the latest customclientraw from my site. I made a mistake in the tags.
In WD we have %timeoflastrainalways% and %timeoflastrain%, the last tag gives a - when there is no rain for the day, and that is in your ccr.
Yep, that will do it, what I really wanted though was a solution that will work with any WD locale - and Cumulus ISO. I think I will have to put a flag in the script to indicate the date format in use.
this works for ISO and dd/mm/yyyy but not the odd mm/dd/yyyy they insist on using in the USA :roll: :lol:
var dt = str[0].replace(/\//g,'-').split('-'); // WD uses dd/mm/yyyy :(
...
var then = new Date((dt[0] > 2000 ? dt[0] : dt[2]), dt[1] - 1, (dt[2] > 2000 ? dt[0] : dt[2]), tm[0], tm[1], 0, 0); // allow for ISO or dd/mm/yyyy
Thanks, that solved it. That’s odd, as I’ve never set the format before on
any pages I’ve edited with Notepad, just used the default, whatever that
is. I’ll have to remember that in the future.