예제 #1
0
파일: validate.py 프로젝트: Toonfish/Purino
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")
예제 #2
0
파일: mydate.py 프로젝트: Toonfish/Purino
def today():
    """
    :return: Timestamp and current username
    """
    now = datetime.datetime.now()
    return formathelp.format_date("{}.{}.{}".format(now.day, now.month, now.year))