AKPlan.templatetags.tags_AKPlan module

AKPlan.templatetags.tags_AKPlan.recently_changed(akslot) → bool[source]

Check whether the given slot was changed (i.e., added or moved) recently and the change should be highlighted

Parameters:

akslot (AKSlot) – akslot to check

Returns:

True if the slot was changed within the highlight period (see PLAN_MAX_HIGHLIGHT_UPDATE_SECONDS)

Return type:

bool

AKPlan.templatetags.tags_AKPlan.highlight_change_colors(akslot)[source]

Adjust color to highlight recent changes if needed

Parameters:

akslot (AKSlot) – akslot to determine color for

Returns:

color that should be used (either default color of the category or some kind of red)

Return type:

str

AKPlan.templatetags.tags_AKPlan.timestamp_now(tz)[source]

Get the current timestamp for the given timezone

Parameters:

tz – timezone to be used for the timestamp

Returns:

current timestamp in given timezone