Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize support for dates / times / time zones #1191

Merged
merged 15 commits into from
Jul 16, 2021
Merged

Conversation

Gabriella439
Copy link
Contributor

Fixes #80

Gabriella439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Jul 9, 2021
@Gabriella439
Copy link
Contributor Author

Here is the matching change to the Haskell implementation: dhall-lang/dhall-haskell#2247

The two test files were backwards
standard/alpha-normalization.md Outdated Show resolved Hide resolved
standard/binary.md Outdated Show resolved Hide resolved
standard/dhall.abnf Outdated Show resolved Hide resolved
standard/dhall.abnf Outdated Show resolved Hide resolved
standard/dhall.abnf Outdated Show resolved Hide resolved
@Nadrieril
Copy link
Member

Great work! I appreciate the thoroughness of the tests

standard/dhall.abnf Outdated Show resolved Hide resolved
… as suggested by @mmhat

Specifically, we don't permit a standalone `Z`, but we permit `Z` as a suffix
for a `Time` or `Date`+`Time`
It turns out that 20 digits of precision doesn't necessarily fit into an
`Int` :)
@Gabriella439 Gabriella439 merged commit 8d22f9f into master Jul 16, 2021
@Gabriella439 Gabriella439 deleted the gabriel/times branch July 16, 2021 23:57
Gabriella439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Jul 24, 2021
@Profpatsch
Copy link
Member

What good does this without the ability for full timestamps?

As the text notes, leap seconds aren’t even supported, so you cannot have a (valid!) timestamp that goes to 23:59:60!

In addition, just having the parts of a timestamp (dates, times, timezone offsets) doesn’t mean it is clear how to construct a canonical date from it.

@Profpatsch
Copy link
Member

Okay, I misread it slightly, it looks like I can have a “normal” timestamp in the surface language, but then it is interpreted as a record that contains the time, date and timezone. Which is a bit … weird, but okay.

My biggest problem with this is that time/date logic is not as simple as having a record with three fields, you need a bunch of operations that can convert opaque types into each other (e.g. UTC into UT1 into UNIX timestamps).

SiriusStarr added a commit that referenced this pull request Jun 30, 2022
This was a regression for issue #1003 introduced by the comments
included in #1191
SiriusStarr added a commit that referenced this pull request Jul 4, 2022
This was a regression for issue #1003 introduced by the comments
included in #1191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date and time types and syntax
5 participants