Skip to content

Instantly share code, notes, and snippets.

@jeshuamaxey
Created July 30, 2015 14:41
Show Gist options
  • Save jeshuamaxey/a609dcc24553e31bfeb2 to your computer and use it in GitHub Desktop.
Save jeshuamaxey/a609dcc24553e31bfeb2 to your computer and use it in GitHub Desktop.
Javascript arrays of day and month names, short and long as well as an array of the number of days in each month.
//long
var DAYS = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'];
//short
var DAYS = [
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat'];
//short
var MONTHS = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'];
//long
var MONTHS = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'];
//days in months
DAYS_IN_MONTH = [
31,
28,
31,
30,
31,
30,
31,
31,
30,
31,
30,
31];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment