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");