States with abbreviations

12 Jun 2006

Sometimes it’s hard to come by this list when you need it. Hope this saves somebody some time. Here are the 50 states with their two-letter abbreviations in a Ruby-formatted array. [ ["ALABAMA","AL"], ["ALASKA","AK"], ["AMERICAN SAMOA","AS"], ["ARIZONA ","AZ"], ["ARKANSAS","AR"], ["CALIFORNIA ","CA"], ["COLORADO ","CO"], ["CONNECTICUT","CT"], ["DELAWARE","DE"], ["DISTRICT OF COLUMBIA","DC"], ["FEDERATED STATES OF MICRONESIA","FM"], ["FLORIDA","FL"], ["GEORGIA","GA"], ["GUAM","GU"], ["HAWAII","HI"], ["IDAHO","ID"], ["ILLINOIS","IL"], ["INDIANA","IN"], ["IOWA","IA"], ["KANSAS","KS"], ["KENTUCKY","KY"], ["LOUISIANA","LA"], ["MAINE","ME"], ["MARSHALL ISLANDS","MH"], ["MARYLAND","MD"], ["MASSACHUSETTS","MA"], ["MICHIGAN","MI"], ["MINNESOTA","MN"], ["MISSISSIPPI","MS"], ["MISSOURI","MO"], ["MONTANA","MT"], ["NEBRASKA","NE"], ["NEVADA","NV"], ["NEW HAMPSHIRE","NH"], ["NEW JERSEY","NJ"], ["NEW MEXICO","NM"], ["NEW YORK","NY"], ["NORTH CAROLINA","NC"], ["NORTH DAKOTA","ND"], ["NORTHERN MARIANA ISLANDS","MP"], ["OHIO","OH"], ["OKLAHOMA","OK"], ["OREGON","OR"], ["PALAU","PW"], ["PENNSYLVANIA","PA"], ["PUERTO RICO","PR"], ["RHODE ISLAND","RI"], ["SOUTH CAROLINA","SC"], ["SOUTH DAKOTA","SD"], ["TENNESSEE","TN"], ["TEXAS","TX"], ["UTAH","UT"], ["VERMONT","VT"], ["VIRGIN ISLANDS","VI"], ["VIRGINIA ","VA"], ["WASHINGTON","WA"], ["WEST VIRGINIA","WV"], ["WISCONSIN","WI"], ["WYOMING","WY"] ]

  • Luke Melia said: Technoweenie's plugin is a simple way to add this to a project, along with a few convenience methods.
  • Danger said: Thanks Luke - I hadn't seen that. I'll probably recommend techno-weenie's to folks in the future. Lately all my projects have had my entire zipcode database in them so I have city and state information handy right next to the code.

Please if you found this post helpful or have questions.