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 module #3296

Merged
merged 61 commits into from
Jul 28, 2024
Merged

add DateTime module #3296

merged 61 commits into from
Jul 28, 2024

Conversation

tim-smart
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Jul 18, 2024

🦋 Changeset detected

Latest commit: e4871d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 31 packages
Name Type
effect Minor
@effect/schema Major
@effect/cli Major
@effect/cluster-browser Major
@effect/cluster-node Major
@effect/cluster-workflow Major
@effect/cluster Major
@effect/experimental Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/platform Major
@effect/printer-ansi Major
@effect/printer Major
@effect/rpc-http Major
@effect/rpc Major
@effect/sql-d1 Major
@effect/sql-drizzle Major
@effect/sql-kysely Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/sql Major
@effect/typeclass Major
@effect/vitest Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tim-smart tim-smart mentioned this pull request Jul 18, 2024
5 tasks
packages/effect/src/DateTime.ts Outdated Show resolved Hide resolved
packages/effect/src/DateTime.ts Outdated Show resolved Hide resolved
packages/effect/src/DateTime.ts Outdated Show resolved Hide resolved
@github-actions github-actions bot changed the base branch from main to next-minor July 19, 2024 03:44
@tim-smart tim-smart changed the title draft: DateTime module add DateTime module Jul 19, 2024
@tim-smart tim-smart marked this pull request as ready for review July 19, 2024 08:38
@tim-smart tim-smart force-pushed the datetime branch 2 times, most recently from 869c1fa to 0092e45 Compare July 19, 2024 09:25
@johtso
Copy link
Contributor

johtso commented Jul 19, 2024

Exciting! Would you consider a type for representing a Date with no time component?

@tim-smart
Copy link
Member Author

Exciting! Would you consider a type for representing a Date with no time component?

Maybe as a separate module in a new PR.

@tim-smart tim-smart requested a review from gcanti as a code owner July 20, 2024 01:52
Copy link
Member

@fubhy fubhy left a comment

Choose a reason for hiding this comment

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

Beautiful api design. Nice.

packages/effect/src/DateTime.ts Show resolved Hide resolved
packages/effect/src/DateTime.ts Outdated Show resolved Hide resolved
packages/effect/src/DateTime.ts Show resolved Hide resolved
packages/schema/src/Schema.ts Outdated Show resolved Hide resolved
packages/schema/src/Schema.ts Outdated Show resolved Hide resolved
@fubhy
Copy link
Member

fubhy commented Jul 20, 2024

One nitpick: I don't like the WithZone naming. The Temporal API uses ZonedDateTime. I think that has a better ring to it. Wdyt?

I'm wondering if we should align even more with the Temporal API suggestion and also use PlainDateTime for those without a timezone. But I'm not sure if I like that namechoice. But on the other hand it might make sense to preemptively align with that API.

@tim-smart
Copy link
Member Author

One nitpick: I don't like the WithZone naming. The Temporal API uses ZonedDateTime. I think that has a better ring to it. Wdyt?

Trying out DateTime.Zoned, will see if it sticks :)

I'm wondering if we should align even more with the Temporal API suggestion and also use PlainDateTime for those without a timezone. But I'm not sure if I like that namechoice. But on the other hand it might make sense to preemptively align with that API.

I'll stick with Utc, as technically this isn't a plain date time as it wraps a epoch timestamp.

@fubhy
Copy link
Member

fubhy commented Jul 20, 2024

Trying out DateTime.Zoned, will see if it sticks :)

Sounds much better imho. Especially in the onUtc vs. onZoned matcher. :-)

Copy link
Member

@fubhy fubhy left a comment

Choose a reason for hiding this comment

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

Hot.

@tim-smart tim-smart force-pushed the datetime branch 2 times, most recently from 9ee184a to 646313e Compare July 21, 2024 02:24
@tim-smart tim-smart force-pushed the datetime branch 2 times, most recently from 162d317 to cb8300c Compare July 21, 2024 09:10
@tim-smart tim-smart merged commit c2a7cd2 into next-minor Jul 28, 2024
@tim-smart tim-smart deleted the datetime branch July 28, 2024 23:03
github-actions bot pushed a commit that referenced this pull request Jul 28, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
@github-actions github-actions bot mentioned this pull request Jul 28, 2024
github-actions bot pushed a commit that referenced this pull request Jul 29, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
github-actions bot pushed a commit that referenced this pull request Jul 29, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
github-actions bot pushed a commit that referenced this pull request Jul 29, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
github-actions bot pushed a commit that referenced this pull request Jul 29, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
tim-smart added a commit that referenced this pull request Jul 29, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
github-actions bot pushed a commit that referenced this pull request Jul 29, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
github-actions bot pushed a commit that referenced this pull request Jul 30, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
github-actions bot pushed a commit that referenced this pull request Jul 30, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
tim-smart added a commit that referenced this pull request Jul 30, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
@github-actions github-actions bot mentioned this pull request Jul 30, 2024
tim-smart added a commit that referenced this pull request Jul 30, 2024
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants