mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 10:47:35 -05:00
* Changed variable names to snakecase for PEP8 formatting. * Changed variable names to snakecase for PEP8 formatting. * fix indentation Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
18 lines
364 B
Python
18 lines
364 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, class_name):
|
|
element.element.classList.remove(class_name)
|
|
|
|
|
|
def add_class(element, class_name):
|
|
element.element.classList.add(class_name)
|