Getting day of the week - a bit confused

Sorry if this is daft!
I’m in Australia and it is Tuesday. If I input {{ now().weekday() }} into the Template Editor, I get 1. Isn’t it meant to be 2? Sunday being the starting point at 0. My result would imply that Monday is the starting point with 0. Thanks

Thanks Rainer!

Python has Monday as the start. Ie. 0

If today is Monday

{{ now().weekday() }}

produces 0.


{{ now().isoweekday() }}

produces 1.

Use whichever function best suits your application.

1 Like

That’s really helpful. Thanks! Much appreciated.