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

feat: add JamTime, TimeSlot and Epoch implementation #19

Merged
merged 20 commits into from
Aug 9, 2024
Merged

Conversation

aranw
Copy link

@aranw aranw commented Jul 25, 2024

First go at the JamTime stuff. Still got some testing to do for this package

I renamed the package from time to jamtime so that it did not clash with the standard library time package. Without remaining we'd of had to alias one of the packages

import (
    "time"
    jamtime "github.com/eigerco/strawberry/internal/time"
)

or

import (
    stdtime "time"
    "github.com/eigerco/strawberry/internal/time"
)

@aranw aranw requested a review from a team July 25, 2024 16:53
@aranw aranw changed the title WIP: feat: add JamTime, TimeSlot and Epoch implementation feat: add JamTime, TimeSlot and Epoch implementation Jul 29, 2024
go.mod Outdated Show resolved Hide resolved
@aranw aranw requested review from a team and pantrif July 30, 2024 12:26
internal/jamtime/jamtime.go Outdated Show resolved Hide resolved
internal/jamtime/jamtime.go Show resolved Hide resolved
internal/jamtime/jamtime.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bamzedev bamzedev left a comment

Choose a reason for hiding this comment

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

I think we should generally return errors.

internal/jamtime/epoch.go Outdated Show resolved Hide resolved
internal/jamtime/epoch.go Outdated Show resolved Hide resolved
internal/jamtime/timeslot.go Outdated Show resolved Hide resolved
internal/jamtime/timeslot.go Outdated Show resolved Hide resolved
internal/jamtime/timeslot.go Outdated Show resolved Hide resolved
internal/jamtime/jamtime.go Outdated Show resolved Hide resolved
internal/jamtime/jamtime.go Outdated Show resolved Hide resolved
internal/jamtime/jamtime.go Show resolved Hide resolved
internal/jamtime/epoch.go Outdated Show resolved Hide resolved
internal/jamtime/epoch.go Outdated Show resolved Hide resolved
internal/jamtime/jamtime.go Outdated Show resolved Hide resolved
@danielvladco danielvladco self-requested a review July 31, 2024 10:50
danielvladco
danielvladco previously approved these changes Jul 31, 2024
danielvladco
danielvladco previously approved these changes Aug 2, 2024
danielvladco
danielvladco previously approved these changes Aug 2, 2024
go.mod Outdated Show resolved Hide resolved
@aranw aranw requested a review from pantrif August 5, 2024 11:16
bamzedev
bamzedev previously approved these changes Aug 7, 2024
asmie
asmie previously approved these changes Aug 7, 2024
@aranw aranw dismissed stale reviews from asmie and bamzedev via 0c5ef05 August 8, 2024 08:50
@aranw aranw requested review from bamzedev and asmie August 8, 2024 08:50
internal/jamtime/epoch.go Outdated Show resolved Hide resolved
internal/jamtime/timeslot.go Outdated Show resolved Hide resolved
@aranw aranw requested a review from pantrif August 8, 2024 15:14
pantrif
pantrif previously approved these changes Aug 9, 2024
internal/jamtime/jamtime.go Outdated Show resolved Hide resolved
internal/jamtime/timeslot.go Outdated Show resolved Hide resolved
it is extremely unlikely that we'll ever get an error from converting
Now() to JamTime due to the date range of Jam. For this to error we'd
expect a computers clock to extremely block and at that point we expect
other things would just never work so for that reason this change was
made
@aranw aranw merged commit 2b46397 into main Aug 9, 2024
2 checks passed
@aranw aranw deleted the feat/jamtime branch August 9, 2024 09:18
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.

5 participants