From d26058c9cd7aa33c0bbbdab5b0123c586c33107e Mon Sep 17 00:00:00 2001 From: "restyled-io[bot]" <32688539+restyled-io[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 09:25:21 +0100 Subject: [PATCH] Restyled by prettier (#271) Co-authored-by: Restyled.io --- src/lib/formatUTCDate.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/formatUTCDate.ts b/src/lib/formatUTCDate.ts index 9aabd7c2..5e1a598c 100644 --- a/src/lib/formatUTCDate.ts +++ b/src/lib/formatUTCDate.ts @@ -2,12 +2,14 @@ import { config } from "app-config/index"; import moment, { Moment } from "moment"; export function formatUTCDate(date: Moment) { - const shiftedDate = moment(date).add((config.dateOffset || 0), 'hours'); - - return shiftedDate.format('YYYY-MM-DD') + const shiftedDate = moment(date).add(config.dateOffset || 0, "hours"); + + return shiftedDate.format("YYYY-MM-DD"); } export const formatNowMinusDays = (days) => formatUTCDate(plusDays(days)); -export const plusDays = (days) => moment.utc() - .add((config.dateOffset || 0), 'hours') - .add(days, 'days'); +export const plusDays = (days) => + moment + .utc() + .add(config.dateOffset || 0, "hours") + .add(days, "days");