Nodejs Utililty Methods Month Name Get

List of utility methods to do Month Name Get

Description

The list of methods to do Month Name Get are organized into topic(s).

Method

getMonthNameShort(lang)
Date.prototype.getMonthNameShort = function(lang) {
    lang = lang && (lang in Date.locale) ? lang : 'de';
    return Date.locale[lang].month_names_short[this.getMonth()];
};
Date.locale = {
    de: {
        month_names: ['Januar', 'Februar', 'M?', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
        month_names_short: ['Jan', 'Feb', 'M?, 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
        day_names: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
...
getMonthNameShort(lang)
Date.prototype.getMonthNameShort = function (lang) {
  lang = lang && (lang in Date.locale) ? lang : 'en';
  return Date.locale[lang].monthNamesShort[this.getMonth()];
};
getMonthFormatted()
Date.prototype.getMonthFormatted = function() {
    var month = this.getMonth()+1;
    return month < 10 ? '0' + month : month; 
getMonthInWords()
Date.prototype.getMonthInWords = function() {
    return ["Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun",
            "Jul",
            "Aug",
...
getMonthOfYear()
var monthsInYear = ["January ", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
Date.prototype.getMonthOfYear = function() {
  return monthsInYear[this.getMonth()];
monthNames[
Date.prototype.monthNames = [
  "January", "February", "March",
  "April", "May", "June",
  "July", "August", "September",
  "October", "November", "December"
];
Date.prototype.getMonthName = function() {
  return this.monthNames[this.getMonth()];
};
...
monthNames[
Date.prototype.monthNames = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
...
monthNames[
Date.prototype.monthNames = [
  "January", "February", "March",
  "April", "May", "June",
  "July", "August", "September",
  "October", "November", "December"
];
Date.prototype.getMonthName = function() {
  return this.monthNames[this.getMonth()];
};
...