Skip to content
@teakit/month documentation

Month offsets

Move a reporting period across a year boundary.

Example

Month.from accepts a year and a zero-padded month. Offsets produce a new month, so you can keep the starting period for comparison.

ts
import { Month } from "@teakit/month";

const december = Month.from("2025-12");
const january = december.add(1);
january.toString();  // "2026-01"
december.toString(); // "2025-12"

When a day matters, pass a full date. Adding one month to January 31 keeps the day anchor and clamps it to the last day of February.