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
|
import mymodule as m
|
||||||
from mymodule import foo as bar
|
x = m.gtime()
|
||||||
m.greeting(m.author)
|
print(x.year)
|
||||||
import platform as plat
|
print(type(x))
|
||||||
print(plat.system())
|
print(x.strftime("%A"))
|
||||||
print(dir(plat))
|
y = m.mdate(2022, 11, 30)
|
||||||
print(bar())
|
print(y)
|
||||||
|
11
mymodule.py
11
mymodule.py
@ -1,6 +1,5 @@
|
|||||||
def greeting(inpt):
|
from datetime import datetime as dt
|
||||||
print(f"Hello {inpt}!")
|
def gtime():
|
||||||
author = "Alfred"
|
return dt.now()
|
||||||
def foo():
|
def mdate(y, mo, d):
|
||||||
print("Foo Fighters!")
|
return dt(y, mo, d)
|
||||||
return "Bar"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user