Skip to content

Standardize support for dates / times / time zones#1191

Merged
Gabriella439 merged 15 commits intomasterfrom
gabriel/times
Jul 16, 2021
Merged

Standardize support for dates / times / time zones#1191
Gabriella439 merged 15 commits intomasterfrom
gabriel/times

Conversation

@Gabriella439
Copy link
Copy Markdown
Contributor

Fixes #80

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

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

The two test files were backwards
@Nadrieril
Copy link
Copy Markdown
Member

Great work! I appreciate the thoroughness of the tests

… 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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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