isExists.d.cts 643 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @name isExists
  3. * @category Common Helpers
  4. * @summary Is the given date exists?
  5. *
  6. * @description
  7. * Checks if the given arguments convert to an existing date.
  8. *
  9. * @param year - The year of the date to check
  10. * @param month - The month of the date to check
  11. * @param day - The day of the date to check
  12. *
  13. * @returns `true` if the date exists
  14. *
  15. * @example
  16. * // For the valid date:
  17. * const result = isExists(2018, 0, 31)
  18. * //=> true
  19. *
  20. * @example
  21. * // For the invalid date:
  22. * const result = isExists(2018, 1, 31)
  23. * //=> false
  24. */
  25. export declare function isExists(
  26. year: number,
  27. month: number,
  28. day: number,
  29. ): boolean;