Skip to content

Commit

Permalink
Restyled by prettier (#271)
Browse files Browse the repository at this point in the history
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
restyled-io[bot] and restyled-commits authored Oct 29, 2020
1 parent 2933e9d commit d26058c
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 d26058c

Please sign in to comment.