MCPcopy Create free account
hub / github.com/Lobos/react-ui / monthDiff

Function monthDiff

src/utils/datetime.js:98–104  ·  view source on GitHub ↗
(d1, d2)

Source from the content-addressed store, hash-verified

96}
97
98export function monthDiff (d1, d2) {
99 let m;
100 m = (d1.getFullYear() - d2.getFullYear()) * 12;
101 m += d1.getMonth();
102 m -= d2.getMonth();
103 return m;
104}
105
106export function format (date, fmt) {
107 if (!date) { return ''; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…