Skip to content

Instantly share code, notes, and snippets.

Last active Jun 1, 2016
What would you like to do?
# coding: utf-8
def get_weekday(date):
import datetime
weekday = ["月","火","水","木","金","土","日"]
d = datetime.datetime.strptime(date, "%Y/%m/%d")
return weekday[d.weekday()]
if __name__ == "__main__":
print get_weekday("2016/05/31")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment