Calendar logo Calendar

Month extends DateTime

constructor Object: config, Week: week, Date: date

Default config:

config = {
  namesType: 'large',
  names: {
    large: [
      'January', 'February', 'March', 'April', 'May', 'June',
      'July', 'August', 'September', 'October', 'November', 'December'
    ],
    short: [
      'Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.',
      'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'
    ]
  }
}

Properties

date Date

Current date.

config Object

Current configuration.

week Week

Week instance.

Methods

getDays Array

Return the days for the month.

getName String: type String

Return the name of the month.

getNameByIndex Number: index, String: type String

Return the name of the specified month.

getLength Number

Return the number of days for the month.

getFirstDay Day

Return the first day of the month.

getLastDay Day

Return the last day of the month.

getSibling Number: diff Month

Return the month at specified position from the current one.

getNames String: type Array

Return names of months.