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

lino.utils.dates

Some general utilities for dates.

Module Attributes

DateRangeValue(start_date, end_date)

A named tuple with two fields start_date and end_date.

Functions

daterange_text(a, b)

weekdays(start_date, end_date)

Return the number of weekdays that fall in the given period.

Classes

DateRangeValue(start_date, end_date)

A named tuple with two fields start_date and end_date.

class lino.utils.dates.DateRangeValue(start_date, end_date)

Bases: tuple

A named tuple with two fields start_date and end_date.

end_date

Alias for field number 1

start_date

Alias for field number 0

lino.utils.dates.weekdays(start_date, end_date)

Return the number of weekdays that fall in the given period. Does not care about holidays.