UNPKG

@ncodedcode/ncode_react_lib

Version:

ncode react application context library

64 lines (63 loc) 2.14 kB
export declare enum NCDateUnit { millisecond = "millisecond", second = "second", minute = "minute", hour = "hour", day = "day", month = "month", year = "year", date = "date", milliseconds = "milliseconds", seconds = "seconds", minutes = "minutes" } export declare const getNCDateToString: (date?: NCDate | undefined, format?: string) => string; export declare class NCDate { static FORMAT_UTC_ISO: string; static FORMAT_LOCAL_DATETIME: string; static FORMAT_LOCAL_DATETIME_COMMA: string; static FORMAT_LOCAL_DATE: string; static FORMAT_LOCAL_DATE_COMMA: string; static FORMAT_LOCAL_MONTH_DAY_WEEK_COMMA: string; static FORMAT_MONTH_DATE_YEAR: string; static FORMAT_MONTH_DATE: string; private dating; private constructor(); private static resolveDating; static now(): NCDate; static create(milliseconds: number): NCDate; static duration(milliseconds: number, format: string, unit?: string): string; static fromDate(date: Date): NCDate; static parse(dateString: string): NCDate; toString(format?: string): string; toMilliseconds(): number; toDate(): Date; toCommaYYMMDD: () => string; year: () => number; month: () => number; day: () => number; hour: () => number; minute: () => number; second: () => number; monthName: () => string; monthNameShort: () => string; monthNameKo: () => string; isAm: () => boolean; isPm: () => boolean; weekDay: () => number; weekDayName: () => string; weekDayNameShort: () => string; weekDayNameKo: () => string; weekDayNameKoShort: () => string; convertDateToText: () => string; convertDateToTextWithoutTime: () => string; isPast: () => boolean; isFuture: () => boolean; isClosing: () => boolean; isEarlierThen: (target: NCDate) => boolean; isLaterThen: (target: NCDate) => boolean; equals: (target: NCDate | Date | number) => boolean; dateEquals: (target: NCDate) => boolean; addDay: (day: number) => NCDate; diff(date: NCDate, unit?: NCDateUnit, float?: boolean): number; }