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

Better explain justification of Date<Tz> #204

Closed
clarfonthey opened this issue Jan 11, 2018 · 4 comments
Closed

Better explain justification of Date<Tz> #204

clarfonthey opened this issue Jan 11, 2018 · 4 comments

Comments

@clarfonthey
Copy link
Contributor

The current docs don't really explain why this type is needed, considering how dates are always the same across time zones.

@Ygg01
Copy link

Ygg01 commented Jan 15, 2018

Same time instants could give different dates, for different time zones.

@clarfonthey
Copy link
Contributor Author

@Ygg01 Yes, but if you can't convert between the time zones then what's the point of keeping that information in the Date?

This isn't really explained very well and it'd be nice to have a few use cases listed in the docs where the time zone is useful.

@quodlibetor
Copy link
Contributor

I don't think that we should have a Date<Tz>, I believe it was originally included because of the common constructor functions (e.g. Utc.ymd(2018, 1, 1).and_hms(1, 2, 3)) require passing the Tz through the Dt, which requires having the parameterized type.

That said I'm currently experimenting with a couple of different constructor (mostly Builder and Default) patterns which will allow us to deprecate Date<Tz> and rename NaiveDate to Date, over a couple releases.

@pitdicker
Copy link
Collaborator

Date<Tz> is deprecated since #851.

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

No branches or pull requests

4 participants