@ds-kit/utils-date
v1.2.1
Published
Utils date component
Downloads
3
Readme
title: "Utils date" slug: "/packages/utils-date" category: "utils" componentNames:
- "Utils Date"
Utils date
import { formatRelative, setLocale } from "@ds-kit/utils-date"
Basic
<div>
<div>{formatRelative(subDays(new Date(), 3), new Date()).toString()}</div>
<div>
{setLocale("hi") &&
formatRelative(subDays(new Date(), 3), new Date()).toString()}
</div>
</div>