nextWednesday.d.ts 688 B

12345678910111213141516171819202122
  1. /**
  2. * @name nextWednesday
  3. * @category Weekday Helpers
  4. * @summary When is the next Wednesday?
  5. *
  6. * @description
  7. * When is the next Wednesday?
  8. *
  9. * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
  10. *
  11. * @param date - The date to start counting from
  12. *
  13. * @returns The next Wednesday
  14. *
  15. * @example
  16. * // When is the next Wednesday after Mar, 22, 2020?
  17. * const result = nextWednesday(new Date(2020, 2, 22))
  18. * //=> Wed Mar 25 2020 00:00:00
  19. */
  20. export declare function nextWednesday<DateType extends Date>(
  21. date: DateType | number | string,
  22. ): DateType;