Skip to content

Instantly share code, notes, and snippets.

@Jarrid
Jarrid / sliding-holidays.js
Last active July 20, 2016 19:44
moment.js + bootstrap-datetimepicker functions to set an array of holidays
// requires moment.js
// for use with the datetime picker here https://eonasdan.github.io/bootstrap-datetimepicker
// these functions are meant to calculate the appropriate date for sliding holidays
// for example, Thanksgiving which occurs on the fourth Thursday in November.
// Not necessarily the same date every year.
// left a ton of console.logs so it can be seen in the browser
function getLastOccurringDayOfMonth(startDate,dayOfWeek)
@Jarrid
Jarrid / name-prefixes-array
Last active June 30, 2019 15:17
Running list of options for name prefixes
$prefixes = array(
'First Lieutenant',
'Admiral',
'Attorney',
'Brother',
'Captain',
'Chief',
'Commander',
'Colonel',
'Dean',
@Jarrid
Jarrid / name-suffixes-array
Last active June 30, 2019 15:18
Running list of options for name suffixes
$suffixes = array(
'II',
'III',
'IV',
'CPA',
'DDS',
'Esq',
'JD',
'Jr',
'LLD',
@Jarrid
Jarrid / state-abbreviation-array.txt
Created June 30, 2019 14:52
state-abbreviation-array
$states = array(
'AL'=>'Alabama',
'AK'=>'Alaska',
'AZ'=>'Arizona',
'AR'=>'Arkansas',
'CA'=>'California',
'CO'=>'Colorado',
'CT'=>'Connecticut',
'DE'=>'Delaware',
'DC'=>'District of Columbia',
@Jarrid
Jarrid / country-abbreviation-array
Created June 30, 2019 15:03
array of countries with two-digit code
$country_array = array(
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
"AI" => "Anguilla",
"AQ" => "Antarctica",
"AG" => "Antigua and Barbuda",