Skip to content

Instantly share code, notes, and snippets.

@ayato-p
Created December 20, 2012 04:15
Show Gist options
  • Save ayato-p/4342942 to your computer and use it in GitHub Desktop.
Save ayato-p/4342942 to your computer and use it in GitHub Desktop.
def dw(y,m,d)
j = y/100
k = y%100
h = (d + (((m+1)*26)/10).to_i + k + (k/4).to_i + (j/4).to_i - (2*19))%7
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment