Skip to content

Commit

Permalink
Merge pull request #8 from imclerran/main
Browse files Browse the repository at this point in the history
Merge main updates into add-date-time-support branch
  • Loading branch information
imclerran authored Apr 18, 2024
2 parents 218ebab + 538ab0e commit 52d14bd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Bundle Release

on:
# Run when a release is published
release:
types:
- published

jobs:
bundle-and-release:
name: Bundle and release library
runs-on: ubuntu-latest
permissions:
contents: write # Used to upload the bundled library
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Install Roc
uses: hasnep/setup-roc@main
with:
roc-version: nightly
- name: Bundle and release the library
uses: hasnep/bundle-roc-library@main
with:
library: package/main.roc # Path to the library's entrypoint
token: ${{ github.token }}
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Roc IsoDate
A Roc package for parsing ISO 8601 Date/Time Strings
A Roc package for parsing ISO 8601 Date/Time Strings.

Soon to be a _universal_ date & time package for Roc! 📆⏰📦

[![Roc-Lang][roc_badge]][roc_link]
[![GitHub last commit][last_commit_badge]][last_commit_link]
[![CI status][ci_status_badge]][ci_status_link]

## Implementation
Roc IsoDate is a rock package which which can convert an ISO date/time string into the [Utc][utc_link] type provided by the Basic CLI and Basic Webserver platforms, which stores the nanoseconds since the UNIX epoch date. When parsing time-only strings, the package returns a [UtcTime][utctime_link], which is similar to the `Utc` type, but stores the nanoseconds since midnight.
Roc IsoDate is a Roc package which which can convert an ISO date/time string into the [Utc][utc_link] type provided by the Basic CLI and Basic Webserver platforms, which stores the nanoseconds since the UNIX epoch date. When parsing time-only strings, the package returns a [UtcTime][utctime_link], which is similar to the `Utc` type, but stores the nanoseconds since midnight.

Note that due to the expense of purchasing the ISO 8601-2:2019 standard document, my implementation is based on a [2016 pre-release][iso_8601_doc] copy of the 8601-1 standard, so my implementation may not fully conform to the latest revision to the standard.

Expand All @@ -18,8 +20,12 @@ Note that due to the expense of purchasing the ISO 8601-2:2019 standard document
- Can Parse from `Str` or from a `List U8` of Utf-8 bytes.

## Future Plans
- Time interval representations will be added once date/time support is complete.
- Once Parsing from iso is complete, add formatting dates and times to ISO strings.
- Add support for parsing to both Utc and DateTime.
- With this comes a slew of features: Times, Dates, DateTimes, and Durations.
- Functionality to convert between the above DateTime types, and Utc types.
- __This means the Library is expanding to be more of a universal DateTime library, and not just for ISO parsing!__ 🚀
- Time interval representations are the next planned feature.
- Once Parsing is complete, add formatting dates and times to ISO strings.
- Research adding custom encoding/decoding for json parsers.

## Known Issues
Expand Down

0 comments on commit 52d14bd

Please sign in to comment.