fix: use parseDate for all date handling
This commit is contained in:
parent
ca0a3e49ac
commit
6cd92acbe3
|
@ -117,8 +117,8 @@ export const newsItem = ({
|
|||
altText,
|
||||
}: any): NewsItem => ({
|
||||
header,
|
||||
published: pubDateSe ? new Date(pubDateSe).toISOString() : '',
|
||||
modified: modDateSe ? new Date(modDateSe).toISOString() : '',
|
||||
published: parseDate(pubDateSe) || '',
|
||||
modified: parseDate(modDateSe) || '',
|
||||
id: newsId,
|
||||
author: authorDisplayName,
|
||||
intro: preamble.replace(/([!,.])(\w)/gi, '$1 $2'),
|
||||
|
@ -221,7 +221,7 @@ export const notification = ({
|
|||
message: messagetext,
|
||||
sender: name,
|
||||
url: linkbackurl,
|
||||
dateCreated: new Date(dateCreated).toISOString(),
|
||||
dateCreated: parseDate(dateCreated) || '',
|
||||
category,
|
||||
type,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue