ape.infrastructure.timemap.RelativeTimeMap

class ape.infrastructure.timemap.RelativeTimeMap

A converter from strings with relative times to seconds

__init__()

Methods

__init__()
log_error(error[, message]) Logs the error in bold red

Attributes

day_expression A compiled regex to extract the number of days
hour_expression A compiled regex to extract the number of hours
logger
return:A logging object.
minute_expression A compiled regex to extract the number of minutes
month_expression A compiled regex to match a month (check for ‘mo’ only)
second_expression A compiled regex to extract the number of seconds
week_expression A compiled regex to extract a number of weeks
year_expression A compiled regex to match a year (only checks for y)
log_error(error, message='')

Logs the error in bold red

Param:
  • error: error type (prefix in red and bold)
  • message: descriptive message (red but not bold)
day_expression

A compiled regex to extract the number of days

hour_expression

A compiled regex to extract the number of hours

logger
Returns:A logging object.
minute_expression

A compiled regex to extract the number of minutes

month_expression

A compiled regex to match a month (check for ‘mo’ only)

second_expression

A compiled regex to extract the number of seconds

week_expression

A compiled regex to extract a number of weeks

year_expression

A compiled regex to match a year (only checks for y)

Navigation