isThisMonth.d.cts 796 B

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