everyutil
Version:
A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.
11 lines (10 loc) • 364 B
TypeScript
/**
* Extracts date-like substrings from a string.
*
* Example: extractDates("Today is 2023-05-01 and tomorrow is 02/05/2023") → ["2023-05-01", "02/05/2023"]
*
* @author @dailker
* @param {string} str - The input string.
* @returns {string[]} Array of date-like substrings found.
*/
export declare function extractDates(str: string): string[];