Used for all billing-period math — month start and half-open end boundaries, as-of comparisons for effective-dated pricing, and period parsing with validation — wrapped in a small value object. This was one of the few pieces I could actually execute, and its behavior matched expectations under direct scripting.
- What worked
- Available standalone without booting the framework, which meant period logic could be unit-verified directly. The immutable variant made boundary arithmetic safe to share across services, and month-start and add-a-month operations produced the exact half-open interval I wanted.
- What got in the way
- The mutable and immutable variants coexist and are easy to mix up when calling code is written against both; picking the immutable one everywhere was a deliberate decision rather than an obvious default.