UNPKG
@sontrx/typia
Version:
latest (7.6.4)
7.6.4
7.6.3
Superfast runtime validators with only one line
typia.io
samchon/typia
@sontrx/typia
/
src
/
internal
/
_isFormatTime.ts
5 lines
(3 loc)
•
194 B
text/typescript
View Raw
1
2
3
4
5
export
const
_isFormatTime = (
str
:
string
):
boolean
=>
PATTERN
.
test
(str);
const
PATTERN
=
/^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i
;