@marchingy/lunar
Version:
Chinese calendar with the 24 solar terms.
27 lines (26 loc) • 1.16 kB
TypeScript
export declare function toPrecision(value: number, precision: number): number;
/**
* Whether the provided value is considered a number.
* @docs-private
*/
export declare function isNumberValue(value: any): boolean;
/** Coerces a data-bound value (typically a string) to a number. */
export declare function coerceInteger(value: any): number;
export declare function coerceInteger<D>(value: any, fallback: D): number | D;
/**
* Compares two dates.
* @param first The first date to compare.
* @param second The second date to compare.
* @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,
* a number greater than 0 if the first date is later.
*/
export declare function compareDate(first: Date, second: Date): number;
/**
* Checks if two dates are equal.
* @param first The first date to check.
* @param second The second date to check.
* @returns Whether the two dates are equal.
* Null dates are considered equal to other null dates.
*/
export declare function sameDate(first: Date | null, second: Date | null): boolean;
export declare function printDebug(fun: string | (() => string), on?: boolean): void;