Development

This commit is contained in:
Matthew Grotke 2026-05-23 03:11:14 -04:00
parent 9f81693334
commit 76c7d81466
4 changed files with 33 additions and 5 deletions

View file

@ -94,6 +94,20 @@ def port(value):
return ''
# ===================================================================
# Time
# ===================================================================
def time_24h(value):
"""Return value if it is a valid 24-hour HH:MM time string, else ''."""
if not value:
return ''
v = str(value).strip()
if re.fullmatch(r'([01]\d|2[0-3]):[0-5]\d', v):
return v
return ''
# ===================================================================
# Integer range
# ===================================================================