From 6dd871f42dab9cee779fe831f8dfdcc53b83217e Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 Date: Fri, 23 Jun 2023 14:33:26 -0400 Subject: [PATCH] Give function better name --- src/shared/components/common/moment-time.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/components/common/moment-time.tsx b/src/shared/components/common/moment-time.tsx index fc83ab46..7c5693ed 100644 --- a/src/shared/components/common/moment-time.tsx +++ b/src/shared/components/common/moment-time.tsx @@ -12,7 +12,7 @@ interface MomentTimeProps { ignoreUpdated?: boolean; } -function momentFormat(input: string) { +function formatDate(input: string) { return format(parseISO(input), "PPPPpppp"); } @@ -25,11 +25,11 @@ export class MomentTime extends Component { const updated = this.props.updated; let line = `${capitalizeFirstLetter( I18NextService.i18n.t("created") - )}: ${momentFormat(this.props.published)}`; + )}: ${formatDate(this.props.published)}`; if (updated) { line += `\n\n\n${capitalizeFirstLetter( I18NextService.i18n.t("modified") - )} ${momentFormat(updated)}`; + )} ${formatDate(updated)}`; } return line; } @@ -50,7 +50,7 @@ export class MomentTime extends Component { return ( {formatPastDate(published)}