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

Add datetime #9

Merged
merged 5 commits into from
Jul 3, 2024
Merged

Add datetime #9

merged 5 commits into from
Jul 3, 2024

Conversation

f-f
Copy link
Contributor

@f-f f-f commented Mar 18, 2024

This PR implements FFI for datetime - it's all fine, except that Chez has a lower bound on the creation of Date objects at 1901. I suspect this is entirely arbitrary, and I mean to open an issue to remove it, but in the meantime we make changes to the PS code.

@f-f f-f requested a review from anttih March 18, 2024 03:23
Copy link
Contributor

@anttih anttih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to calculate the separate fields lazily so that we wouldn't have to use a huge record to store all of the parts? For example, just store the milliseconds since epoch and then calculate other fields when needed.

datetime/src/Data/DateTime.ss Outdated Show resolved Hide resolved
@f-f
Copy link
Contributor Author

f-f commented Jul 2, 2024

Is there any way to calculate the separate fields lazily so that we wouldn't have to use a huge record to store all of the parts? For example, just store the milliseconds since epoch and then calculate other fields when needed.

I can't think of any - the issue is that the PureScript implementation just passes a record over the FFI boundary, so that's what we need to work with

@f-f
Copy link
Contributor Author

f-f commented Jul 3, 2024

@anttih this is ready for another look

@f-f f-f merged commit 9c3e6ea into master Jul 3, 2024
1 check passed
@f-f f-f deleted the add-datetime branch July 3, 2024 13:40
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.

2 participants