Skip to content

Instantly share code, notes, and snippets.

@sibelius
Created October 4, 2019 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sibelius/f27991c34110605281e95c6b7b565410 to your computer and use it in GitHub Desktop.
Save sibelius/f27991c34110605281e95c6b7b565410 to your computer and use it in GitHub Desktop.
fix date-fns format
import moment from 'moment';
export const formatFns = (date: Date | string | number, fmt: string) => {
return moment(date).format(fmt);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment