Browse Source

Add triple equals

pull/2362/head
Frane Caleta 2 years ago
committed by Thomas
parent
commit
ef4a3edf25
  1. 2
      libs/common/src/lib/helper.ts

2
libs/common/src/lib/helper.ts

@ -306,7 +306,7 @@ const DATE_FORMATS = [
// Helper function to parse a date string // Helper function to parse a date string
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) {
date = date.toString(); date = date.toString();
const match = date.match(/^(\d{4})(\d{2})(\d{2})$/); const match = date.match(/^(\d{4})(\d{2})(\d{2})$/);
if (match) { if (match) {

Loading…
Cancel
Save