you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 1 year ago (3 children)

Python does have a year option that they are not using. Depending on the application I would use 365 for a year to get a consistent number of days.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 1 year ago* (1 child)

    Python does have a year option that they are not using.

    No, it doesn't:

    help(datetime.timedelta)

    Help on class timedelta in module datetime:
    
    class timedelta(builtins.object)
     |  Difference between two datetime values.
     |
     |  timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
     |
     |  All arguments are optional and default to 0.
     |  Arguments may be integers or floats, and may be positive or negative.
    

  • source
  • parent
  • hideshow 1 child comment