MCPcopy Create free account
hub / github.com/apitable/apitable / getDay

Function getDay

packages/core/src/utils/date_time.ts:24–34  ·  view source on GitHub ↗
(day: Date, dayOffset?: number)

Source from the content-addressed store, hash-verified

22}
23
24export function getDay(day: Date, dayOffset?: number) {
25 if (dayOffset != null) {
26 day.setDate(day.getDate() + dayOffset);
27 }
28
29 day.setMilliseconds(0);
30 day.setSeconds(0);
31 day.setMinutes(0);
32 day.setHours(0);
33 return day;
34}
35
36export function isSameDay(day1: Date | number, day2: Date | number): boolean { // Determine if it is the same day
37 day1 = new Date(day1);

Callers 3

componentDidUpdateMethod · 0.90
DatePickerMobileBaseFunction · 0.90
getTodayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected