uIsoWeek

Returns the week number defined by ISO 8601

The first week of a year is number 01, which is defined as being the week that contains the first Thursday of the calendar year, which implies that it is also:

  • The first week that is mostly within the calendar year

  • The week containing January 4th

  • The week starting with the Monday nearest to January 1st

The last week of a year, number 52 or 53, therefore is:
  • The week that contains the last Thursday of the calendar year

  • The last week that is mostly within the calendar year

  • The week containing December 28th

  • The week ending with the Sunday nearest to December 31st

Syntax

number uIsoWeek([modifiers])

Parameters

Examples