Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
libs/common/src/lib/helper.ts
|
@ -294,7 +294,7 @@ export const DATE_FORMAT_YEARLY = 'yyyy'; |
|
|
|
|
|
|
|
|
export function parseDate(date: string): Date | null { |
|
|
export function parseDate(date: string): Date | null { |
|
|
// Transform 'yyyyMMdd' format to supported format by parse function
|
|
|
// Transform 'yyyyMMdd' format to supported format by parse function
|
|
|
if (date.length === 8) { |
|
|
if (date?.length === 8) { |
|
|
const match = date.match(/^(\d{4})(\d{2})(\d{2})$/); |
|
|
const match = date.match(/^(\d{4})(\d{2})(\d{2})$/); |
|
|
|
|
|
|
|
|
if (match) { |
|
|
if (match) { |
|
|