8000 GitHub - DCKT/rescript-date-fns: Bindings for date-fns library
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DCKT/rescript-date-fns

Repository files navigation

rescript-date-fns

ReScript bindings for date-fns (targeted version : ~3.3.1)

Setup

  1. Install the module
bun install @dck/rescript-date-fns
# or
yarn install @dck/rescript-date-fns
# or
npm install @dck/rescript-date-fns
  1. Add it to your rescript.json config
{
  "bsc-dependencies": ["@dck/rescript-date-fns"]
}

Usage

The functions can be accessed through DateFns module.

let now = Js.Date.make()
let yesterday = now->DateFns.subDays(1)
let isoDate = "2024-02-17T16:59:23.164Z"

Js.log(yesterday->DateFns.isYesterday) // true
Js.log(isoDate->DateFns.parseISO->DateFns.isValid) // true

Development

Install deps

bun install

Compiles files

bun run dev

Run tests

bun test

About

Bindings for date-fns library

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0