Skip to content

Instantly share code, notes, and snippets.

@avwave
Created October 15, 2014 12:24
Show Gist options
  • Save avwave/28f44db1ca1dbb6d354e to your computer and use it in GitHub Desktop.
Save avwave/28f44db1ca1dbb6d354e to your computer and use it in GitHub Desktop.
For the United States:
Begin DST: Sunday April (2+6*y-y/4) mod 7+1
End DST: Sunday October (31-(y*5/4+1) mod 7)
Valid for years 1900 to 2006, though DST wasn't adopted until the 1950s-1960s. 2007 and after:
Begin DST: Sunday March 14 - (1 + y*5/4) mod 7
End DST: Sunday November 7 - (1 + y*5/4) mod 7;
European Economic Community:
Begin DST: Sunday March (31 - (5*y/4 + 4) mod 7) at 1h U.T.
End DST: Sunday October (31 - (5*y/4 + 1) mod 7) at 1h U.T.
Since 1996, valid through 2099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment