Month Names (Stupidly Useful)

Often times I want the stupidest things in an array or table. Today’s item is month’s name.

Month Names in a Table to Copy and Paste to a Spreadsheet

Month Name 3 Letter Name Zero Based Index One Based Index
January Jan 0 1
February Feb 1 2
March Mar 2 3
April Apr 3 4
May May 4 5
June Jun 5 6
July Jul 6 7
August Aug 7 8
September Sep 8 9
October Oct 9 10
November Nov 10 11
December Dec 11 12

String in Various Arrays

// Javascript - Zero based array
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

// Javascript - One based array
var monthNames = ["Shift 1", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

// C# - Zero based array
string [] monthNames = new string [] {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};

// C# - One based array
string [] monthNames = new string [] {
"Shift 1", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};

Why have a one based array?
Most people will enter months starting at ‘1’ not zero. Most date object return January as a 1. Use which work best for you.