finalynx.simulator.recurrence

Module Contents

Classes

RecurrenceBase

Abstract class to define how often an Event should be triggered.

DeltaRecurrence

Program an action to happen every few days/months/years.

MonthlyRecurrence

Program an action to happen every nth day of the month.

API

class finalynx.simulator.recurrence.RecurrenceBase(until: Optional[datetime.date] = None)[source]

Abstract class to define how often an Event should be triggered.

Initialization

next(current_date: datetime.date) Optional[datetime.date][source]
abstract _next_date(current_date: datetime.date) datetime.date[source]
class finalynx.simulator.recurrence.DeltaRecurrence(days: Optional[int] = None, months: Optional[int] = None, years: Optional[int] = None, until: Optional[datetime.date] = None)[source]

Bases: finalynx.simulator.recurrence.RecurrenceBase

Program an action to happen every few days/months/years.

Initialization

_next_date(current_date: datetime.date) datetime.date[source]
class finalynx.simulator.recurrence.MonthlyRecurrence(day_of_the_month: int, n_months: int = 1, until: Optional[datetime.date] = None)[source]

Bases: finalynx.simulator.recurrence.RecurrenceBase

Program an action to happen every nth day of the month.

Initialization

Program an action to happen every nth day of the month.

Parameters:

n_months – Optionally skip some months.

_next_date(current_date: datetime.date) datetime.date[source]