Compare commits
2 Commits
66648900dd
...
b8d3f3b943
| Author | SHA1 | Date | |
|---|---|---|---|
| b8d3f3b943 | |||
| 62ce77fdf4 |
@@ -7,7 +7,7 @@
|
|||||||
# Email: billie@odwyer.xyz
|
# Email: billie@odwyer.xyz
|
||||||
# Description: A script that returns the time in a speech like manner, for example 'quarter past two'
|
# Description: A script that returns the time in a speech like manner, for example 'quarter past two'
|
||||||
|
|
||||||
import time
|
from datetime import datetime
|
||||||
|
|
||||||
def return_hour(n):
|
def return_hour(n):
|
||||||
# Determine what the current hour to return is
|
# Determine what the current hour to return is
|
||||||
@@ -80,8 +80,8 @@ def cat(h,m):
|
|||||||
return return_hour(h) + " o'clock"
|
return return_hour(h) + " o'clock"
|
||||||
|
|
||||||
|
|
||||||
h = time.gmtime()[3]
|
h = datetime.now().hour
|
||||||
m = time.gmtime()[4]
|
m = datetime.now().minute
|
||||||
|
|
||||||
print(cat(h,m))
|
print(cat(h,m))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user