isPast.d.cts 487 B

1234567891011121314151617181920
  1. import type { DateArg } from "./types.js";
  2. /**
  3. * @name isPast
  4. * @category Common Helpers
  5. * @summary Is the given date in the past?
  6. * @pure false
  7. *
  8. * @description
  9. * Is the given date in the past?
  10. *
  11. * @param date - The date to check
  12. *
  13. * @returns The date is in the past
  14. *
  15. * @example
  16. * // If today is 6 October 2014, is 2 July 2014 in the past?
  17. * const result = isPast(new Date(2014, 6, 2))
  18. * //=> true
  19. */
  20. export declare function isPast(date: DateArg<Date> & {}): boolean;