MCPcopy Create free account
hub / github.com/chhoumann/quickadd / fmt

Function fmt

src/utils/dateModifiers.test.ts:78–81  ·  view source on GitHub ↗
(iso: string, boundary: "start" | "end", unit: string)

Source from the content-addressed store, hash-verified

76
77describe("applyDateSnap", () => {
78 const fmt = (iso: string, boundary: "start" | "end", unit: string) =>
79 applyDateSnap(moment(iso), { boundary, unit: unit as never }).format(
80 "YYYY-MM-DD HH:mm:ss.SSS",
81 );
82
83 it("snaps to the start of the week (locale: Sunday)", () => {
84 // Thu 2023-06-01 -> Sun 2023-05-28

Callers 1

Calls 3

applyDateSnapFunction · 0.90
momentFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected