def date(inv_date): if len(str(inv_date)) != 0: inv_date = formathelp.format_date(inv_date) if not inv_date: return errors.print_error("val_date_syntax") return True return errors.print_error("val_date_missing")
def today(): """ :return: Timestamp and current username """ now = datetime.datetime.now() return formathelp.format_date("{}.{}.{}".format(now.day, now.month, now.year))