The monthWeek()
method can be used to determine the week of the month a date is in.
moment("01/01/2014").monthWeek(); // 0
Plugin for calculating the occurrence of the day of the week in the month.
Similar to moment().monthWeek()
, the return value is zero-indexed.
A return value of 2 means the date is the 3rd occurence of that day
of the week in the month.
Recur can also be created the following ways:
moment().recur()
moment().recur(options)
moment().recur(start, end)
moment(start).recur(end)
moment().recur(end)
Generated using TypeDoc
The
dateOnly()
method can be used to remove any time information from a moment.moment("2014-01-01 09:30:26").dateOnly(); // 01/01/2014 12:00:00 AM