08 What does the function Day of the year do?

The function Day of the year converts the current date to the day number or the day number to the date and outputs additional information. The additional information are weekday, weekday number and week number.

The calculation of the weekday number and week number is done according to ISO 8601 as well as according to alternative counting, e.g. US.

Background ISO 8601 date formats and time information

ISO 8601 – Wikipedia

ISO 8601 is an international standard of the ISO, which contains recommendations over numerical date formats and time data. The title of the standard is Data elements and interchange formats – Information interchange – Representation of dates and times, translated as “Data elements and interchange formats; Information interchange; Representation of dates and times”.

Encoding of the date to day number

The entered date is immediately converted into the day number.

Additionally it is output:

  • Weekday
  • Weekday number
  • Week number

Decoding the day number to the date

The entered day number is immediately converted to the date.

Additionally it is output:

  • Weekday
  • Weekday number
  • Week number