1.0.0 • Published 5 years ago

@ied/date v1.0.0

Weekly downloads
157
License
MIT
Repository
-
Last release
5 years ago

Date

Date (deprecated, please use https://www.npmjs.com/package/date-fns)

Install

yarn add @ied/date

Use

import { getRelativeDate } from '@ied/date'

const date = '2018-02-13T10:42:21.341Z'
const formatedDate = getRelativeDate(date)

Types

type Locale = 'en' | 'fr' | 'de' | 'da'
type GetRelativeDate = (string: string | Date, locale: Locale) => string