feat(app/utils, plugins): normalize dates with improved format (#573)

This commit is contained in:
Simon Lecoq authored and GitHub committed 2021-10-13 22:08:31 -04:00
1 parent 19036b2e41
commit 662fe8de2f
16 files changed
+32 -16

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@ export default async function({login, imports, data, q, account}, {enabled = fal
//Format text
console.debug(`metrics/compute/${login}/plugins > tweets > formatting tweet ${tweet.id}`)
tweet.createdAt = `${imports.format.date(tweet.created_at, {timeStyle:"short"})} on ${imports.format.date(tweet.created_at, {dateStyle:"short"})}`
tweet.createdAt = `${imports.format.date(tweet.created_at, {time:true})} on ${imports.format.date(tweet.created_at, {date:true})}`
tweet.text = imports.htmlescape(
//Escape tags
imports.htmlescape(tweet.text, {"<":true, ">":true})