Test datetime.
This commit is contained in:
parent
d6c6b781d5
commit
83f2bd5d5d
Binary file not shown.
13
main.py
13
main.py
@ -1,8 +1,7 @@
|
||||
#Module test
|
||||
import mymodule as m
|
||||
from mymodule import foo as bar
|
||||
m.greeting(m.author)
|
||||
import platform as plat
|
||||
print(plat.system())
|
||||
print(dir(plat))
|
||||
print(bar())
|
||||
x = m.gtime()
|
||||
print(x.year)
|
||||
print(type(x))
|
||||
print(x.strftime("%A"))
|
||||
y = m.mdate(2022, 11, 30)
|
||||
print(y)
|
||||
|
11
mymodule.py
11
mymodule.py
@ -1,6 +1,5 @@
|
||||
def greeting(inpt):
|
||||
print(f"Hello {inpt}!")
|
||||
author = "Alfred"
|
||||
def foo():
|
||||
print("Foo Fighters!")
|
||||
return "Bar"
|
||||
from datetime import datetime as dt
|
||||
def gtime():
|
||||
return dt.now()
|
||||
def mdate(y, mo, d):
|
||||
return dt(y, mo, d)
|
||||
|
Loading…
Reference in New Issue
Block a user