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 4018) - 28 March 2024

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 drop-down menus to 2030)

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

Web Tag <DaysSince30Dec1899>

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
User avatar
krmidas
Posts: 215
Joined: Sat 03 Jul 2010 9:03 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Lake Zurich, IL; USA
Contact:

Web Tag <DaysSince30Dec1899>

Post by krmidas »

Has anyone had success with the web tag <DaysSince30Dec1899> (replacing 30Dec1899 with their own date)? I've tried it and it doesn't deliver a value. My date is 18 June 2005. I've tried "Jun" as well as "June". Neither worked.

-Tom
Tom Keramidas, Lake Zurich, IL, USA
Image
User avatar
mcrossley
Posts: 12695
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 <DaysSince30Dec1899>

Post by mcrossley »

You can't change the date, the tag is <#DaysSince30Dec1899> the calendar base date, you cannot specify an arbitrary date.
User avatar
krmidas
Posts: 215
Joined: Sat 03 Jul 2010 9:03 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Lake Zurich, IL; USA
Contact:

Re: Web Tag <DaysSince30Dec1899>

Post by krmidas »

I wish there was a tag to indicate the station age (in days), which in my case is greater than the number of days I've been using Cumulus.
Tom Keramidas, Lake Zurich, IL, USA
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Web Tag <DaysSince30Dec1899>

Post by beteljuice »

You could always use some javascript or php ;)
Image
......................Imagine, what you will KNOW tomorrow !
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Web Tag <DaysSince30Dec1899>

Post by RayProudfoot »

krmidas wrote: Fri 08 Nov 2019 11:52 pm I wish there was a tag to indicate the station age (in days), which in my case is greater than the number of days I've been using Cumulus.
I've been using <#DaysSinceRecordsBegan> for ages. That sounds like it would suit your needs. Visible in a grey banner on my site: http://www.cheadlehulmeweather.co.uk/
Cheers,
Ray, Cheshire.

Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Web Tag <DaysSince30Dec1899>

Post by beteljuice »

<#DaysSinceRecordsBegan> ...
... which in my case is greater than the number of days I've been using Cumulus
Javascript is very unfriendly with date and time, but this will do what you want:

Code: Select all

<span id="since"></span> days of records<br/>

<script>
    var today = new Date();
    var dd = today.getDate();
    var mm = today.getMonth()+1; //January is 0!
    var yyyy = today.getFullYear();
    if(dd<10) {
    dd='0'+dd
    }
    if(mm<10) {
    mm='0'+mm
    }
    today = yyyy+'/'+mm+'/'+dd;
	
    fromdate = "2006/01/08"; // enter your from date yyyy/mm/dd
	
    var date2 = new Date(today);
    var date1 = new Date(fromdate);
    var timeDiff = Math.abs(date2.getTime() - date1.getTime());
    var dayDifference = Math.ceil(timeDiff / (1000 * 3600 * 24));
    document.getElementById("since").innerHTML = dayDifference;
</script>
Note: The <script> must be somewhere below the <span> else it can't 'see' it.

... and yes I tested it ;)
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
krmidas
Posts: 215
Joined: Sat 03 Jul 2010 9:03 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Lake Zurich, IL; USA
Contact:

Re: Web Tag <DaysSince30Dec1899>

Post by krmidas »

That script worked for me! Thanks!
Tom Keramidas, Lake Zurich, IL, USA
Image
Post Reply