Read about our upcoming Code of Conduct on this issue

  • nmartensen's avatar
    add heuristic for reading timedelta · efb8780f9f2a
    nmartensen authored
    Since dates, times, and elapsed time are all usually stored as simple
    numbers in XLSX, openpyxl uses a heuristic to recognize the values as
    date/time representation and returns datetime.datetime or datetime.time
    objects for them. The heuristic is based on inspecting the number format
    style string (is this a date format?) and the stored value itself (to
    distinguish times from datetimes).
    
    This commit refines the heuristic by adding support for recognizing and
    returning time interval durations as datetime.timedelta.
    
    --HG--
    branch : 3.0
    efb8780f9f2a
numbers.py 4.9 KB