Skip to content

Instantly share code, notes, and snippets.

@andrewarosario
Created September 29, 2020 15:07
Show Gist options
  • Save andrewarosario/b66b5b6bebd769a8fb284ebbaa5b46c3 to your computer and use it in GitHub Desktop.
Save andrewarosario/b66b5b6bebd769a8fb284ebbaa5b46c3 to your computer and use it in GitHub Desktop.
export class MomentAdapter implements DateFormatter {
getTimeFromNow(dateTime: string): string {
return moment(dateTime, 'DD/MM/YYYY, HH:mm:ss').locale('pt-BR').fromNow()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment