Files
TechRadarAJR/src/date.ts
2022-01-11 15:39:13 +01:00

8 lines
256 B
TypeScript

import moment from "moment";
const isoDateToMoment = (isoDate: moment.MomentInput) =>
moment(isoDate, "YYYY-MM-DD");
export const formatRelease = (isoDate: moment.MomentInput, format: string = "MMMM YYYY") =>
isoDateToMoment(isoDate).format(format);