timrwood/moment — pull request #503 by timrwood (2012-11-07 21:03:00+00:00)
Title: Weeks

See #501

Note: This is not ready to be merged in yet, just wanted to open it up for comments.

This PR will add `moment.fn.isoWeek` and `moment.fn.week` as getter/setter methods. `moment.fn.isoWeek` is the ISO week as defined at [1]. `moment.fn.week` is a localized week numbering based on the rules at [2].

Each localization is able to specify which day of the week should be included in the first week of the year and which day of the week starts a new week.

It also adds `W WW Wo` tokens to the format which map to `isoWeek` and redefines the `w ww wo` tokens to use `moment.fn.week`.

[1] http://en.wikipedia.org/wiki/ISO_week_date
[2] http://www.pjh2.de/datetime/weeknumber/wnd.php?l=en