Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino_xl.lib.cal.utils

Some calendar utilities.

See cal : Calendar functionality.

Functions

aware(d)

Convert the given datetime into a timezone-aware datetime.

dt2kw(dt, name, **d)

Store given timestamp dt in a field dict.

parse_rrule(rr)

Parse the given recurrence rule and returns a tuple of (every_unit, every, max_events, keywords) where keywords is ...

resolve_datetime(s)

setkw(obj, **kw)

update_auto_component(model, autotype, user, ...)

Creates, updates or deletes the automatic calendar component of the specified auto_type and owner.

update_auto_event(autotype, user, date, ...)

update_auto_task(autotype, user, date, ...)

update_reminder(type, owner, user, orig, ...)

Shortcut for calling update_auto_task() for automatic "reminder tasks".

when_text(d[, t])

Return a string with a concise representation of the given date and time combination.

lino_xl.lib.cal.utils.aware(d)

Convert the given datetime into a timezone-aware datetime.

lino_xl.lib.cal.utils.dt2kw(dt, name, **d)

Store given timestamp dt in a field dict. name is the base name of the fields.

lino_xl.lib.cal.utils.when_text(d, t=None)

Return a string with a concise representation of the given date and time combination.

lino_xl.lib.cal.utils.update_auto_component(model, autotype, user, date, summary, owner, **defaults)

Creates, updates or deletes the automatic calendar component of the specified auto_type and owner.

Specifying None for date means that the automatic component should be deleted.

lino_xl.lib.cal.utils.update_reminder(type, owner, user, orig, msg, num, unit)

Shortcut for calling update_auto_task() for automatic “reminder tasks”. A reminder task is a message about something that will happen in the future.

lino_xl.lib.cal.utils.parse_rrule(rr: str) tuple[Any, int, int | datetime | date, dict]

Parse the given recurrence rule and returns a tuple of (every_unit, every, max_events, keywords) where keywords is …