For calculating average values or balances it would be great to get the number of the actual 'day of the year'.
e.g.:
<data timeframe="actual">
<item sensor="date0" cat="dayofyear" unit="utc">120</item> (e.g. for 30th April this year)
For instance multiplying (math function in meteohub) the average solar radiation of the current year with the 'dayofyear' to get the sum of the solar radiation up to now.
Andreas
dayofyear for html-templares
Moderator: Mattk
-
- Fresh Boarder
- Posts: 7
- Joined: Wed Feb 05, 2014 11:28 am
dayofyear for html-templares
Vantage Pro2 + Meteohub
-
- Fresh Boarder
- Posts: 7
- Joined: Fri Apr 03, 2015 11:04 am
Re: dayofyear for html-templares
Hello,
With PHP, you can use the "z" format parameter :
echo date("z") give the day of the year for the current date.
Hope this help
With PHP, you can use the "z" format parameter :
echo date("z") give the day of the year for the current date.
Hope this help

-
- Fresh Boarder
- Posts: 7
- Joined: Wed Feb 05, 2014 11:28 am
Re: dayofyear for html-templares
Thanks Bruno,
I will try.
Best regards, Andreas
I will try.
Best regards, Andreas
Vantage Pro2 + Meteohub