you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 11 months ago (1 child)

Does this account for leap years?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 11 months ago (1 child)

    I don't think this is implemented in the standard datetime library, but in principle overriding sub is easily possible and you can define it as you'd wish.

    However, I think subtracting a year is a bit ill defined, because it isn't clear which year you're subtracting given the leap year issue.

  • source
  • parent
  • hideshow 2 child comments