jQuery: The Write Less, Do More JavaScript Library

UI/Datepicker/$.datepicker.iso8601Week

From jQuery JavaScript Library

Jump to: navigation, search


« Back to UI/Datepicker

$.datepicker.iso8601Week( date )

Determine the week of the year for a given date: 1 to 53.
This function uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the first week of the current year, and that up to three days from the current year may be included in the last week of the previous year.
Since v3.1.
Arguments:
dateDate
The date to find the week for.


Examples:
Find the week of the year for a date.

$.datepicker.iso8601Week(new Date(2007, 1 - 1, 26));

NameType