maha.parsers.rules.duration.utils#

Module Contents#

Functions#

convert_between_durations(*durations, to_unit)

Converts a list of durations to another unit using the mapping DURATION_CONVERSION_MAP.

convert_between_durations(*durations, to_unit)[source]#

Converts a list of durations to another unit using the mapping DURATION_CONVERSION_MAP.

Parameters
  • *durations (ValueUnit) – List of durations to convert.

  • to_unit (DurationUnit) – The unit to convert to.

Returns

The converted value.

Return type

float