test(datetime): add unit tests for parseDate()

This commit is contained in:
Manu Mtz.-Almeida
2018-12-05 18:26:39 +01:00
committed by Manu MA
parent aa9d0d4282
commit e75618e82f
2 changed files with 68 additions and 2 deletions

View File

@ -178,7 +178,7 @@ export function parseDate(val: string | undefined | null): DatetimeData | undefi
// ISO 8601 format: 1994-12-15T13:47:20Z
let parse: any[] | null = null;
if (val != null) {
if (val) {
// try parsing for just time first, HH:MM
parse = TIME_REGEXP.exec(val);
if (parse) {