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.

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.