isDateTime method
Date Time regex
Return true
to utc & common formatted date time.
Valid Formats:
- All DateTime regex (UTC) valid examples
- many combination of
YYYY-MM-DD HH:mm:ss
- HH:mm AM (or PM)
- MMMM yyyy
- MMM, d yyyy
- etc.
Examples:
- 2018-01-04T05:52:34
- 2018-01-04
- 2018-01-04 05:52
- 01/Oct/04 01:23
- May 16, 2023
- 07:00 PM
- Wednesday, 21 May 2023
- 01/25
- 00:30:20
- Wed, Jan 26
- etc.
Implementation
bool isDateTime() => RegVal.hasMatch(
this,
RegexPattern.dateTime,
);