Created
September 1, 2014 06:13
-
-
Save r2DoesInc/bdcba8245fc3933bf679 to your computer and use it in GitHub Desktop.
Revisions
-
Ken created this gist
Sep 1, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ function doesTheMailRunToday(today) { var reason = ''; if (today.is().sunday()) reason = "It's Sunday."; else if (today.equals(Date.parse("January 1"))) reason = "It's New Year's."; else if (today.equals(Date.january().third().monday())) reason = "It's Martin Luther King Day."; else if (today.equals(Date.february().third().monday())) reason = "It's Presidents' Day."; else if (today.equals(Date.may().final().monday())) reason = "It's Memorial Day."; else if (today.equals(Date.parse("July 4"))) reason = "It's Independence Day."; else if (today.equals(Date.september().first().monday())) reason = "It's Labor Day."; else if (today.equals(Date.october().second().monday())) reason = "It's Columbus Day."; else if (today.equals(Date.parse("November 11"))) reason = "It's Veterans' Day."; else if (today.equals(Date.parse("November 12")) && today.is().monday()) reason = "It's Veterans' Day. (Observed)"; else if (today.equals(Date.november().fourth().thursday())) reason = "It's Thanksgiving."; else if (today.equals(Date.parse("December 25"))) reason = "It's Christmas.";