UNPKG

@acrool/js-utils

Version:

Common javascript utils methods for project development

36 lines (35 loc) 883 B
import dayjs, { Dayjs } from 'dayjs'; export declare const dateUtils: { today: dayjs.Dayjs; thisWeek: dayjs.Dayjs; lastWeek: dayjs.Dayjs; twoWeekAgo: dayjs.Dayjs; thisMonth: dayjs.Dayjs; halfYearAgo: dayjs.Dayjs; }; export declare const format: { date: string; dateDash: string; dateTime: string; shortDateTime: string; shortTime: string; time: string; }; export declare enum EDayKey { today = "today", yesterday = "yesterday", thisWeek = "thisWeek", lastWeek = "lastWeek", twoWeekAgo = "twoWeekAgo", thisMonth = "thisMonth", lastMonth = "lastMonth", twoMonth = "twoMonth", thisHalfYear = "thisHalfYear", thisYear = "thisYear" } export interface IRangeDate { startDate: Dayjs; endDate: Dayjs; } export type TDayList = Record<EDayKey, IRangeDate>; export declare const dayList: TDayList;