@mbarlocker/date-curry
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

date-curry

CI NPM version License

Simplified date parsing and formatting from strings. This project wraps the parse and format functions of date-fns.

Installation

yarn add @mbarlocker/date-curry

Examples

import { curryDateFormat } from '@mbarlocker/date-curry'

const formats = curryDateFormat('P p')

const now = new Date().toISOString() // it'd be easier to use a date here, but imagine you got this date string from an API
console.log('Current time in current locale is', formats.format(now))
console.log('Current time in date format is', formats.parse(now))

License

Copyright © 2023-present Matthew Barlocker.

@mbarlocker/date-curry is licensed under the MIT License. See LICENSE for the full license text.

Package Sidebar

Install

npm i @mbarlocker/date-curry

Weekly Downloads

47

Version

0.0.4

License

MIT

Unpacked Size

16.2 kB

Total Files

10

Last publish

Collaborators

  • mbarlocker