time#

Functions and classes for handling time

Classes

date

Define a single date; based on pd.Timestamp

Time

Handle time vectors for both simulations and modules.

TimePar

Base class for time-aware parameters, durations and rates

dur

Any number that acts like a duration

rate

Any number that acts like a rate; can be greater than 1

time_prob

A probability over time (a.k.a.

beta

A container for beta (i.e. the disease transmission rate).

rate_prob

An instantaneous rate converted to a probability; must be >=0.

Functions

time_ratio

Calculate the relationship between two sets of time factors

date_add

Add two dates (or integers) together

date_diff

Find the difference between two dates (or integers)

days

Shortcut to ss.dur(value, units='day')

years

Shortcut to ss.dur(value, units='year')

perday

Shortcut to ss.rate(value, units='day')

peryear

Shortcut to ss.rate(value, units='year')