Day of Year (June 6 = 157)

Trying to get and Eto calculation done inside HA, this may be over my head for a noob :slightly_smiling_face: right now I am stuck on getting the day of the year (for example June 6 would be day 157) any idea on how to accomplish this. Note I am not really concerned about leap years as it won’t make much difference in the end calculation.

This reports today’s ‘year day’.

{{ now().timetuple().tm_yday }}
1 Like

Oh sweet, I searched quite a bit and couldn’t find anything, thank you!

1 Like

You’re welcome!

Here’s more information about timetuple()

Thank you, I keep forgetting to use Python as a reference. Any resource suggestions for all the math I have to do to get this calculation to work? (link for example https://www.ipcinfo.org/fileadmin/user_upload/faowater/docs/ReferenceManualV32.pdf)