/**
 * @since Last modified: 2023-11-15 10:26:14
 * @function isDateStr
 * @param {string|number} str - Strings with numbers(e.g.2021-2-5,2021/2/5,2021,2021-2,2-5)
 * @description Determine whether the text can be successfully converted into the date type.
 * @returns {boolean} Return true or false.
 * @see {@link https://codepen.io/axui/pen/mdvBqmq|demo @ codepen}
 * @example
 * ax.isDateStr('2021-2-5');
 * <!-- return true -->
 */
'use strict';
const isDateStr = (str) => (typeof str === 'string' && !isNaN(Date.parse(str)));
export default isDateStr;
