Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaeljones/rada
A Gleam package for dates
https://github.com/michaeljones/rada
date gleam
Last synced: 27 days ago
JSON representation
A Gleam package for dates
- Host: GitHub
- URL: https://github.com/michaeljones/rada
- Owner: michaeljones
- License: bsd-3-clause
- Created: 2024-05-11T14:04:53.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-09T11:04:02.000Z (5 months ago)
- Last Synced: 2024-10-30T16:56:42.811Z (about 1 month ago)
- Topics: date, gleam
- Language: Gleam
- Homepage: https://hexdocs.pm/rada
- Size: 76.2 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gleam - rada - [📚](https://hexdocs.pm/rada/) - A library for dates with no times or time zones (Packages / Time)
README
# rada
This package provides a simple `Date` type for working with dates without times or zones.
## Origins
This is a port of the [justinmimbs/date](https://package.elm-lang.org/packages/justinmimbs/date/latest) Elm library.
Done with the kind permission of the author. The API has been adjusted to match norms of the Gleam language in places.## Installation
```sh
gleam add rada
```## Usage
```gleam
import gleam/io
import gleam/listimport rada/date
pub fn main() {
let today = date.today()
let one_week_later = date.add(today, 1, date.Weeks)date.range(date.Day, 1, today, one_week_later)
|> list.each(fn(entry)
date.format(entry, "EEEE, d MMMM y") |> io.println
})
}
```Documentation can be found at .