@codianz/better-date
Version:
The Date object easier to work with.
16 lines (15 loc) • 688 B
TypeScript
import { DayOfWeek } from "./day-of-week";
export interface IYMD {
year: number;
month: number;
day: number;
}
export declare function isSameYmd(a: IYMD | undefined, b: IYMD | undefined): boolean;
export declare function ymdToString(ymd: IYMD): string;
export declare function isValidYmd(ymd: IYMD): boolean;
export declare function stringToYmd(s: string): IYMD;
export declare function isYmdLike(s: unknown): s is IYMD;
export declare function getDayOfWeek(ymd: IYMD): DayOfWeek;
export declare function addDays(ymd: IYMD, days: number): IYMD;
export declare function addMonths(ymd: IYMD, months: number): IYMD;
export declare function diffYmdDays(a: IYMD, b: IYMD): number;