MCPcopy Index your code
hub / github.com/geekcomputers/Python / find_day

Function find_day

Day_of_week.py:14–20  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

12
13
14def find_day(date):
15 born = (
16 datetime.datetime.strptime(date, "%d %m %Y").weekday()
17 ) # this statement returns an integer corresponding to the day of the week
18 return calendar.day_name[
19 born
20 ] # this statement returns the corresponding day name to the integer generated in the previous statement
21
22
23# To get the input from the user

Callers 1

Day_of_week.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected