Skip to content

Instantly share code, notes, and snippets.

@kuanyingchou
Last active August 29, 2015 14:24
Show Gist options
  • Save kuanyingchou/f12bc1d9b0866c134605 to your computer and use it in GitHub Desktop.
Save kuanyingchou/f12bc1d9b0866c134605 to your computer and use it in GitHub Desktop.
#include "PerpetualCalendar.h"
int main() {
PerpetualCalendar c;
//assert(c.dayofweek(10, 3, 1493) == 4);
//assert(c.dayofweek(5, 20, 1493) == 1);
assert(c.dayofweek(7, 4, 1776) == 4);
assert(c.dayofweek(7, 14, 1789)== 2);
assert(c.dayofweek(6, 18, 1815)== 7);
assert(c.dayofweek(2, 29, 1960)== 1);
assert(c.dayofweek(6, 18, 1815)== 7);
assert(c.dayofweek(6, 28, 1914)== 7);
assert(c.dayofweek(3, 23, 1933)== 4);
assert(c.dayofweek(8, 6, 1845)== 3);
assert(c.dayofweek(10, 22, 1960)== 6);
assert(c.dayofweek(11, 9, 1989)== 4);
assert(c.dayofweek(5, 2, 2011)== 1);
assert(c.dayofweek(4, 30, 1945)== 1);
assert(c.dayofweek(2, 29, 1960)== 1);
assert(c.dayofweek(2, 29, 1964)== 6);
assert(c.dayofweek(2, 29, 1972)== 2);
assert(c.dayofweek(2, 29, 1976)== 7);
assert(c.dayofweek(2, 29, 1980)== 5);
assert(c.dayofweek(2, 29, 1896)== 6);
assert(c.dayofweek(2, 29, 1924)== 5);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment