Skip to content

Conversation

@Qqwy
Copy link
Contributor

@Qqwy Qqwy commented Dec 30, 2021

Implementation of #129

  • Date generator
    • Tests
  • Time generator
    • Tests
  • DateTime generator
    • Tests
  • NaiveDateTime generator
    • Tests

So far a generator function has added to create Date structs, including the accompanying tests.

The implementation for Time, DateTime and NaiveDateTime will be similar, except that their unit of offset will be fractions of milliseconds (rather than days), and of course the Date.Range-related code does not apply.

Since their implementation will be very similar, this seemed like a good moment to give you the opportunity to provide initial feedback on the code.

Happy holidays! 🎆

@Qqwy Qqwy changed the title WIP: Date time generators WIP: Date & time generators Dec 30, 2021
@Qqwy
Copy link
Contributor Author

Qqwy commented Jan 3, 2022

@whatyouhide Just a gentle reminder in case the notification of this PR slipped through the cracks.

Of course, take your time, and happy new-year's holidays! 😊

@Qqwy Qqwy changed the title WIP: Date & time generators WaitingForFeedback: Date & time generators Jan 4, 2022
@whatyouhide
Copy link
Owner

I like where this is going. Is there any way we can use Date.add/2 (and eventually DateTime.add/3 and friends) here instead of converting between days and dates?

@Qqwy
Copy link
Contributor Author

Qqwy commented Jan 21, 2022

I like where this is going. Is there any way we can use Date.add/2 (and eventually DateTime.add/3 and friends) here instead of converting between days and dates?

I think this should be possible, at least for most of the cases. 👍

@Qqwy Qqwy changed the title WaitingForFeedback: Date & time generators WIP: Date & time generators Jan 21, 2022
Munksgaard added a commit to Munksgaard/stream_data that referenced this pull request Aug 24, 2025
This is a reimplementation of the date generators by @Qqwy in whatyouhide#161.

The tests and documentation are entirely copy-pasted from his PR,
but the actual implementation is entirely new. As noted by @whatyouhide in a
comment to the original PR, I've opted to use the new `Date.add` function for
most of the cases.

I think the resulting implementation is a bit easier to follow.

Co-authored-by: Qqwy / Marten <[email protected]>
Munksgaard added a commit to Munksgaard/stream_data that referenced this pull request Aug 24, 2025
This is a reimplementation of the date generators by @Qqwy in whatyouhide#161. As such, it
is a (partial) implementation for whatyouhide#129.

The tests and documentation are entirely copy-pasted from his PR,
but the actual implementation is entirely new. As noted by @whatyouhide in a
comment to the original PR, I've opted to use the new `Date.add` function for
most of the cases.

I think the resulting implementation is a bit easier to follow. I have not added
Time, DateTime or NaiveDateTime, though I think we could probably do something
for those that follow this skeleton.

Co-authored-by: Qqwy / Marten <[email protected]>
@Munksgaard Munksgaard mentioned this pull request Aug 24, 2025
Munksgaard added a commit to Munksgaard/stream_data that referenced this pull request Aug 28, 2025
This is a reimplementation of the date generators by @Qqwy in whatyouhide#161. As such, it
is a (partial) implementation for whatyouhide#129.

The tests and documentation are entirely copy-pasted from his PR,
but the actual implementation is entirely new. As noted by @whatyouhide in a
comment to the original PR, I've opted to use the new `Date.add` function for
most of the cases.

I think the resulting implementation is a bit easier to follow. I have not added
Time, DateTime or NaiveDateTime, though I think we could probably do something
for those that follow this skeleton.

Co-authored-by: Qqwy / Marten <[email protected]>
Co-authored-by: Andrea Leopardi <[email protected]>
Munksgaard added a commit to Munksgaard/stream_data that referenced this pull request Aug 29, 2025
This is a reimplementation of the date generators by @Qqwy in whatyouhide#161. As such, it
is a (partial) implementation for whatyouhide#129.

The tests and documentation are entirely copy-pasted from his PR,
but the actual implementation is entirely new. As noted by @whatyouhide in a
comment to the original PR, I've opted to use the new `Date.add` function for
most of the cases.

I think the resulting implementation is a bit easier to follow. I have not added
Time, DateTime or NaiveDateTime, though I think we could probably do something
for those that follow this skeleton.

Co-authored-by: Qqwy / Marten <[email protected]>
Co-authored-by: Andrea Leopardi <[email protected]>
whatyouhide added a commit that referenced this pull request Sep 2, 2025
This is a reimplementation of the date generators by @Qqwy in #161. As such, it
is a (partial) implementation for #129.

The tests and documentation are entirely copy-pasted from his PR,
but the actual implementation is entirely new. As noted by @whatyouhide in a
comment to the original PR, I've opted to use the new `Date.add` function for
most of the cases.

I think the resulting implementation is a bit easier to follow. I have not added
Time, DateTime or NaiveDateTime, though I think we could probably do something
for those that follow this skeleton.

Co-authored-by: Qqwy / Marten <[email protected]>
Co-authored-by: Andrea Leopardi <[email protected]>
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