Skip to content

Commit

Permalink
chinese: toChineseMonth to accept dates
Browse files Browse the repository at this point in the history
  • Loading branch information
n-riesco committed Dec 14, 2016
1 parent 7eb73fd commit 6b9ffe7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jquery-src/jquery.calendars.chinese.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,16 @@

/** Retrieve the month (i.e. accounting for intercalary months).
@memberof ChineseCalendar
@param year {number} The year.
@param year {CDate|number} The date or the year to examine.
@param monthIndex {number} The month index (0 for first month).
@return {number} The month (1 for first month).
@throws Error if an invalid month/year or a different calendar used. */
toChineseMonth: function(year, monthIndex) {
if (year.year) {
year = year.year();
monthIndex = year.month();
}

// compute intercalary month in the year (0 if none)
var intercalaryMonth = this.intercalaryMonth(year);

Expand Down

0 comments on commit 6b9ffe7

Please sign in to comment.