Skip to content

Commit

Permalink
Merge pull request #591 from lukem512/master
Browse files Browse the repository at this point in the history
getX functions for Year, Month and Day
  • Loading branch information
Serhioromano committed Apr 27, 2016
2 parents 81907f1 + eccca5a commit a0f4704
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions js/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,21 @@ if(!String.prototype.formatNum) {
}
return;
};

Calendar.prototype.getYear = function() {
var p = this.options.position.start;
return p.getFullYear();
};

Calendar.prototype.getMonth = function() {
var p = this.options.position.start;
return this.locale['m' + p.getMonth()];
};

Calendar.prototype.getDay = function() {
var p = this.options.position.start;
return this.locale['d' + p.getDay()];
};

Calendar.prototype.isToday = function() {
var now = new Date().getTime();
Expand Down

0 comments on commit a0f4704

Please sign in to comment.