Skip to content

Create a datetime.timedelta.totalseconds property #50270

Closed

Description

@mw44118
mannequin
BPO 6020
Superseder
  • bpo-5788: datetime.timedelta is inconvenient to use...
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-05-14.21:36:29.591>
    created_at = <Date 2009-05-14.16:57:56.407>
    labels = ['library']
    title = 'Create a datetime.timedelta.totalseconds property'
    updated_at = <Date 2009-05-14.21:36:29.590>
    user = 'https://bugs.python.org/mw44118'

    bugs.python.org fields:

    activity = <Date 2009-05-14.21:36:29.590>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-05-14.21:36:29.591>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2009-05-14.16:57:56.407>
    creator = 'mw44118'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 6020
    keywords = []
    message_count = 1.0
    messages = ['87741']
    nosy_count = 1.0
    nosy_names = ['mw44118']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '5788'
    type = None
    url = 'https://bugs.python.org/issue6020'
    versions = ['Python 2.7']

    Activity

    1. mw44118 commented on May 14, 2009

      mw44118mannequin
      MannequinAuthor

      I do this kind of thing a lot:

      >> from datetime import timedelta
      >> td = timedelta(days=2, seconds=14)
      >> total_duration_in_seconds = td.days * 24 * 60 * 60 + td.seconds

      I would like to have a property on the timedelta object do this for me.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on May 14, 2009
    3. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions