UNPKG

@web3r/flowerkit

Version:

Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).

15 lines (14 loc) 645 B
export type TGetPureDateArgs = Parameters<typeof getPureDate>; export type TGetPureDateReturn = ReturnType<typeof getPureDate>; /** * Gets a Date instance without time (hours, minutes, seconds, and milliseconds) * @param date{*=} * @returns {Date|null} * @example * // How to get a date without time e.g., hours, minutes, seconds, and milliseconds? * const dateWithTime = new Date(); * console.log(dateWithTime.getMilliseconds()); // => {number} * const dateWithoutTime = getPureDate(dateWithTime); * console.log(dateWithoutTime.getMilliseconds()); // => 0 */ export declare const getPureDate: (date?: any | undefined) => Date | null;