react-web-native-sketch
Version:
[TODO: We need an overview of how this can be used via npm vs as a local package]
13 lines (12 loc) • 1.08 kB
TypeScript
import { DATE_FORMATS, LOCALES, MOMENT_FORMAT, TIMEZONES } from "./enums";
export declare function formatDate(format: MOMENT_FORMAT, date: Date): string;
export declare type Timestamp = number;
export declare function isDateValid(locale: LOCALES, format: DATE_FORMATS, dateString: string): boolean | null;
export declare function profileInputFormat(locale: LOCALES): DATE_FORMATS;
export declare function parseFormattedDate(timezone: TIMEZONES, locale: LOCALES, format: DATE_FORMATS, datestr: string): number | null;
export declare function formatTs(timezone: TIMEZONES, locale: LOCALES, format: MOMENT_FORMAT, timestamp: number): string;
export declare function formatDateInterval(timezone: TIMEZONES, locale: LOCALES, dateStart: number, dateEnd: number): string | undefined;
export declare function localOffsetMins(tz: TIMEZONES, date: Date): number;
export declare function utcOffset(tz: TIMEZONES, ts: Timestamp): number;
export declare function tsFromFormattedDate(tz: TIMEZONES, date: Date): number;
export declare function toFormattedDate(tz: TIMEZONES, ts: Timestamp): Date;