isToday.d.cts 694 B

12345678910111213141516171819202122232425262728
  1. import type { ContextOptions, DateArg } from "./types.js";
  2. /**
  3. * The {@link isToday} function options.
  4. */
  5. export interface IsTodayOptions extends ContextOptions<Date> {}
  6. /**
  7. * @name isToday
  8. * @category Day Helpers
  9. * @summary Is the given date today?
  10. * @pure false
  11. *
  12. * @description
  13. * Is the given date today?
  14. *
  15. * @param date - The date to check
  16. * @param options - An object with options
  17. *
  18. * @returns The date is today
  19. *
  20. * @example
  21. * // If today is 6 October 2014, is 6 October 14:00:00 today?
  22. * const result = isToday(new Date(2014, 9, 6, 14, 0))
  23. * //=> true
  24. */
  25. export declare function isToday(
  26. date: DateArg<Date> & {},
  27. options?: IsTodayOptions | undefined,
  28. ): boolean;