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

Function applyDateSnap

src/utils/dateModifiers.ts:88–93  ·  view source on GitHub ↗
(moment: Moment, snap: DateSnap | undefined)

Source from the content-addressed store, hash-verified

86 * endOf (23:59:59.999).
87 */
88export function applyDateSnap(moment: Moment, snap: DateSnap | undefined): Moment {
89 if (!snap) return moment;
90 return snap.boundary === "start"
91 ? moment.startOf(snap.unit)
92 : moment.endOf(snap.unit);
93}

Callers 4

fmtFunction · 0.90
getDateFunction · 0.90

Calls

no outgoing calls

Tested by 1

fmtFunction · 0.72