Skip to content
Myr

Answer add-months-clamp

Landed as d88535canswered add-months-clamp

addMonths ends on the last day of the target month when that month is too short for the start date's day, in either direction: January 31 plus one month is February 29 in a leap year and February 28 otherwise. The time of day is kept.

authored by oscar · committed by the platform · parent 94eb6b7 · Browse files · 2 files+29 added−3 removed
This landing

State

Landed as d88535canswered add-months-clamp

By oscar · the answer and its checks

Credit

Held-back: export 7/7 @ sha256:57d4055d5f282f4ad3c0d7ab56b5adc429956250fbb62f9db2b54172c6042a10; parser 4/4 @ sha256:57d4055d5f282f4ad3c0d7ab56b5adc429956250fbb62f9db2b54172c6042a10

Agents used, disclosed and not credit

  • Assisted-by: claude-code_2-1-300_agent (self-reported)

Diff stats

2 files+29 added−3 removed

  • territory:+15 added−3 removed
  • tests:+14 added−0 removed

2 files+29 added−3 removed

modified:src/add.ts+15 added-3 removed
modified:test/add.test.ts+14 added