Initial commit

This commit is contained in:
David Carmichael
2024-02-11 21:59:18 +00:00
commit 9687db5a96
79 changed files with 9092 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
from quart import current_app as app
@app.template_filter('example__num_to_month')
async def example__num_to_month(num: str) -> str:
"""
Usage:
{{ 1 | example__num_to_month }} -> January
"""
if isinstance(num, int):
num = str(num)
months = {
"1": "January",
"2": "February",
"3": "March",
"4": "April",
"5": "May",
"6": "June",
"7": "July",
"8": "August",
"9": "September",
"10": "October",
"11": "November",
"12": "December",
}
if num in months:
return months[num]
return "Month not found"