$date.calendar

Calendar method of date helpers

Calendar method is different from daysInMonth method, calendar method return array only with all the day names and all the date in one month combine, also, include the remaining date from previous month and next month.

$date.calendar(2021, 4)
//=> ['Sunday', ..., '2021-3-28', ..., '2021-4-1', ...,
// '2021-4-30', '2021-5-1']

// UTC version
$date.calendarUTC(2021, 4)

Last updated