MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / dateDifferanceInDays

Function dateDifferanceInDays

apps/start/src/utils/date.ts:6–9  ·  view source on GitHub ↗
(date1: Date, date2: Date)

Source from the content-addressed store, hash-verified

4import en from 'javascript-time-ago/locale/en';
5
6export function dateDifferanceInDays(date1: Date, date2: Date) {
7 const diffTime = Math.abs(date2.getTime() - date1.getTime());
8 return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
9}
10
11export function getLocale() {
12 if (typeof navigator === 'undefined') {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected