Nodejs Month Calculate getShortMonth()

Here you can find the source of getShortMonth()

Method Source Code

Date.prototype.getShortMonth = function () {
   return ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][this.getMonth()];
};

Related

  1. getLastDateInMonth(months)
    Date.prototype.getLastDateInMonth = function (months){
      months = parseInt(months);
      return new Date(this.getFullYear(), this.getMonth() + (months || 0) + 1, 0);
    
  2. getLastDayOfMonth()
    Date.prototype.getLastDayOfMonth = function () {
        var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7;
        return (day < 0) ? (day + 7) : day;
    
  3. getMonth2()
    Date.prototype.getMonth2 = function () {
       var month = this.getMonth() + 1;
       return (month < 10 ? '0' : '') + month;
    };
    
  4. getMonthEnd()
    Date.prototype.getMonthEnd = function () {
      return new Date(this.getFullYear(), this.getMonth() + 1, 0);
    };
    
  5. getMonthStart()
    Date.prototype.getMonthStart = function () {
      return new Date(this.getFullYear(), this.getMonth(), 1);
    };
    
  6. getShortMonthName()
    Date.prototype.getShortMonthName = function () {
      var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
      ];
      return monthNames[this.getMonth()];
    };
    
  7. incrementMonth( iIncrementValue )
    var aMonths = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]
    var aDays = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
    Date.prototype.incrementMonth = function ( iIncrementValue )
      this.setMonth(
        this.getMonth() + iIncrementValue
      )
    Date.prototype.toDayString = function ()
    ...
    
  8. isAfterMonth(d)
    Date.prototype.isAfterMonth = function (d) {
        var tDate = new Date(this.getFullYear(), this.getMonth(), this.getDate());
        var pDate = new Date(d.getFullYear(), d.getMonth(), d.getDate());
        if(tDate.getFullYear() < pDate.getFullYear()) return false;
        if(tDate.getMonth() < pDate.getMonth()) return false;
        return true;
    
  9. isBeforeMonth(d)
    Date.prototype.isBeforeMonth = function (d) {
        var tDate = new Date(this.getFullYear(), this.getMonth(), this.getDate());
        var pDate = new Date(d.getFullYear(), d.getMonth(), d.getDate());
        if(tDate.getFullYear() > pDate.getFullYear()) return false;
        if(tDate.getMonth() > pDate.getMonth()) return false;
        return true;