agenda/agenda/__init__.py
Edward Betts 1af5d7856f Add support for RRULE for YAML events
Remove code for events that can be represented via RRULE
2023-11-09 17:51:01 +01:00

18 lines
375 B
Python

"""Agenda functions."""
from datetime import date, datetime, time
import pytz
uk_tz = pytz.timezone("Europe/London")
def uk_time(d: date, t: time) -> datetime:
"""Combine time and date for UK timezone."""
return uk_tz.localize(datetime.combine(d, t))
def uk_midnight(d: date) -> datetime:
"""Midnight UK time."""
return uk_time(d, datetime.min.time())