# -*- coding: utf-8 -*- # Copyright (c) 2021, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. from aniso8601 import compat from aniso8601.builders import TupleBuilder from aniso8601.builders.python import PythonTimeBuilder from aniso8601.date import parse_date from aniso8601.decimalfraction import normalize from aniso8601.exceptions import ISOFormatError from aniso8601.resolution import DurationResolution from aniso8601.time import parse_time def get_duration_resolution(isodurationstr): # Valid string formats are: # # PnYnMnDTnHnMnS (or any reduced precision equivalent) # PnW # PT