mirror of
https://github.com/pyscript/pyscript.git
synced 2022-05-01 19:47:48 +03:00
13 lines
369 B
Python
13 lines
369 B
Python
from datetime import datetime as dt
|
|
|
|
def format_date(dt_, fmt = "%m/%d/%Y, %H:%M:%S"):
|
|
return dt_.strftime(fmt)
|
|
|
|
def now(fmt = "%m/%d/%Y, %H:%M:%S"):
|
|
return format_date(dt.now(), fmt)
|
|
|
|
def remove_class(element, className):
|
|
element.element.classList.remove("line-through")
|
|
|
|
def add_class(element, className):
|
|
element.element.classList.add("line-through") |