News for hackers. Stuff that matters.
Re:Good Design is Imperfect Design, Part 1: Honest Names by ummonk on Wednesday August 04, 2021 @09:13PM (#28068549)
I’d argue it should be shiftBy rather than advanceBy to deal with negative periods, but yes. The issue here is the conflation of summing periods (commutative and associative) with shifting a date by a certain period.

None of the proposed names in the post actually clarify anything - they merely make the behavior seem more confusing.

Re:Good Design is Imperfect Design, Part 1: Honest Names by labawi on Thursday August 05, 2021 @03:09AM (#28070761)
IMO, it should be advanceBy, if going backwards takes a negative interval. Shift by 10d isn't completely clear which on direction it would shift.