@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
18 lines (17 loc) • 713 B
TypeScript
export type DayISO = `${number}-${number}-${number}`;
export declare function findFirstDayOfWeek(localeName: string): number;
export declare function getWeekdayInfo(localeName?: string): {
firstDayOfWeek: number;
weekdayLabels: string[];
};
export declare function dateArgToISO(arg: DateConstructor["arguments"]): any;
/**
* ISO 8601 date format (YYYY-MM-DD) in **UTC** timezone
*/
export declare function toISO(date: Date): DayISO;
/**
* ISO 8601 date format (YYYY-MM-DD) in **local** timezone
*/
export declare function toLocalISO(date: Date): DayISO;
export declare function fromISO(iso: DayISO): Date;
export declare function offsetISO(iso: DayISO, days: number): `${number}-${number}-${number}`;