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 "Plain" prefix to Date, Time, DateTime, YearMonth, MonthDay types (e.g. PlainDate) #1072

Closed
justingrant opened this issue Oct 29, 2020 · 0 comments · Fixed by #1118 or #1120
Closed
Labels
documentation Additions to documentation has-consensus help wanted non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! spec-text Specification text involved zoned-type Part of the effort for a type with timestamp+timezone

Comments

@justingrant
Copy link
Collaborator

Per the decisions in #707, we will be adding a Plain prefix to Temporal's unzoned date and/or time types. (The date/time type with a time zone will be called ZonedDateTime.)

Adding this prefix is a straightforward but labor-intensive change, so it's a great first issue for someone who wants to help out.

Specific changes needed:

Date => PlainDate
Time => PlainTime
DateTime => PlainDateTime
YearMonth => PlainYearMonth
MonthDay => PlainMonthDay

Changes need to be made in the polyfill code, polyfill tests, Temporal docs, cookbook sample, and the Temporal spec.

You can read #707 for the history behind these changes, but here's the TL;DR:

  • We don't want to encourage users (via a short, prefixless name) to use an unzoned date/time type. Instead, we want users to think about their use case and decide on an zoned or unzoned date/time type without the names putting a thumb on the scale. Therefore, we'll prefix the unzoned date/time type.
  • For consistency, we'll apply the same prefix to all other unzoned date or time types: Date, Time, YearMonth, MonthDay
  • We came up with a short list of prefixes for the community to consider, and Plain won by a 3:1 margin over other possible prefixes choices in a 166-vote Twitter poll.
@justingrant justingrant added documentation Additions to documentation has-consensus help wanted non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! spec-text Specification text involved zoned-type Part of the effort for a type with timestamp+timezone labels Oct 29, 2020
@justingrant justingrant added this to the Stable proposal milestone Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Additions to documentation has-consensus help wanted non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! spec-text Specification text involved zoned-type Part of the effort for a type with timestamp+timezone
Projects
None yet
1 participant