Skip to content

Instantly share code, notes, and snippets.

@jwhitehorn
Created February 23, 2018 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwhitehorn/1f32d3ace977a8a72d7cfa263eb1a492 to your computer and use it in GitHub Desktop.
Save jwhitehorn/1f32d3ace977a8a72d7cfa263eb1a492 to your computer and use it in GitHub Desktop.
The oh so overshadowed, mostly last day of February
var isMostlyLastDayOfFebruary = function(){
var now = new Date();
var isFeb28 = now.getMonth() == 1 && now.getDate() == 28;
var year = now.GetFullYear();
var isLeapYear = year % 4 == 0 && !(year % 100 == 0 && year % 400 != 0);
return isFeb28 && !isLeapYear;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment