Permalink
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (17 sloc) 500 Bytes
title version signature
ISO Day of Week
2.1.0
moment().isoWeekday(Number); moment().isoWeekday(); // Number

Gets or sets the ISO day of the week with 1 being Monday and 7 being Sunday.

moment().isoWeekday(1); // Monday
moment().isoWeekday(7); // Sunday

A day name is also supported. This is parsed in the moment's current locale.

moment().isoWeekday("Sunday");
moment().isoWeekday("Monday");