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
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
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 <DaysSince30Dec1899>
- mcrossley
- Posts: 12800
- 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>
You can't change the date, the tag is <#DaysSince30Dec1899> the calendar base date, you cannot specify an arbitrary date.
- 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>
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.
- 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>
You could always use some javascript or php
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 3393
- 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>
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/
- 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>
<#DaysSinceRecordsBegan> ...
Javascript is very unfriendly with date and time, but this will do what you want:... which in my case is greater than the number of days I've been using Cumulus
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>
... and yes I tested it
......................Imagine, what you will KNOW tomorrow !
- 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>
That script worked for me! Thanks!