dayofyear for html-templares

Requests for future functionality

Moderator: Mattk

Post Reply
Andreas RD
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Wed Feb 05, 2014 11:28 am

dayofyear for html-templares

Post by Andreas RD »

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
Vantage Pro2 + Meteohub

meteo-bures
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Apr 03, 2015 11:04 am

Re: dayofyear for html-templares

Post by meteo-bures »

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 ;-)

Andreas RD
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Wed Feb 05, 2014 11:28 am

Re: dayofyear for html-templares

Post by Andreas RD »

Thanks Bruno,

I will try.

Best regards, Andreas
Vantage Pro2 + Meteohub

Post Reply