Skip to content

Commit

Permalink
Restyled by prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Oct 28, 2020
1 parent 2933e9d commit 3f234e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/lib/formatUTCDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit 3f234e3

Please sign in to comment.