I am trying to implement a "get day of week" (Su=0,Mo,...,Sa=6) function in plain javascript and stumbled upon the Tomohiko Sakamoto Algorithm, Wang and Schwerdtfeger.