๐Ÿ“ฆ kukimik / dhall-date-format

Utilities for formatting dates in the Dhall configuration language.

โ˜… 2 stars โ‘‚ 0 forks ๐Ÿ‘ 2 watching โš–๏ธ The Unlicense
datedhall-langformatting
๐Ÿ“ฅ Clone https://github.com/kukimik/dhall-date-format.git
HTTPS git clone https://github.com/kukimik/dhall-date-format.git
SSH git clone git@github.com:kukimik/dhall-date-format.git
CLI gh repo clone kukimik/dhall-date-format
Michaล‚ Kukieล‚a Michaล‚ Kukieล‚a first commit 4031bc7 1 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ src
๐Ÿ“„ LICENSE
๐Ÿ“„ README.md
๐Ÿ“„ README.md

Utilities for formatting Dates as Text in the Dhall configuration language.

Usage example

let DF = ./src/package.dhall
let F = DF.Formats

in
  [DF.format F.`MM.DD.YYYY` 1991-09-17
  ,DF.format F.`the Dth of MMMM, YYYY` 1990-04-01
  ,DF.format (DF.mask "D@MMMM[YY]") 1970-01-01
  ]

evaluates to

[ "09.17.1991", "the 1st of April, 1990", "1@January[70]" ]

Available formats

The formats provided by the library all live in ./src/Formats/package.dhall.

It is easy to implement your own format; see the source code of the existing formats and proceed analogously. You may also use ./src/mask.dhall to create a simple format using a Text mask.