javascript months array
'use strict';
(function(d){
var mL = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
var mS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
d.prototype.getLongMonth = d.getLongMonth = function getLongMonth (inMonth) {
return gM.call(this, inMonth, mL);
}
d.prototype.getShortMonth = d.getShortMonth = function getShortMonth (inMonth) {
return gM.call(this, inMonth, mS);
}
function gM(inMonth, arr){
var m;
if(this instanceof d){
m = this.getMonth();
}
else if(typeof inMonth !== 'undefined') {
m = parseInt(inMonth,10) - 1; // Subtract 1 to start January at zero
}
return arr[m];
}
})(Date);
Also in JavaScript:
- file picker electron
- js set visibility on timeout
- canvas cut path to image
- select parent of elemt
- jquery delete grand parent of clicked element
- scrollview not working react-native
- install gatsbyjs using npx
- jquery when iframe is loaded
- javascript version of sleep
- in react js how to access history in component
- get top items from json object
- set variable with json javascript
- append new element for each value in array d3.js
- jquery select by data attribute
- javascript detect textarea change
- react js http post 500 internal server error
- legend on click use default chartjs
- pageyoffset jquery
- how to get connection string value from appsettings.json in .net core
- how to code a discord bot in javascript
- inheritance in javascript
- javascript remove all spaces from string
- add style js without overwrite
- $(document).on in javascript