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

Function find_day

days_from_date.py:17–23  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

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

Callers 1

printtFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected