Files
pyscript/pyscriptjs/examples/utils.py
Jason Barnwell 707474e835 Changed variable names to snake_case for PEP8 formatting (#211)
* 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>
2022-05-06 12:18:08 -05:00

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)