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

Fields operation on calendar #666

Closed
ptomato opened this issue Jun 11, 2020 · 0 comments · Fixed by #1014
Closed

Fields operation on calendar #666

ptomato opened this issue Jun 11, 2020 · 0 comments · Fixed by #1014
Assignees
Labels
documentation Additions to documentation non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! spec-text Specification text involved

Comments

@ptomato
Copy link
Collaborator

ptomato commented Jun 11, 2020

Follow up from #638. The calendar needs a way to say which fields are relevant for a particular operation. A getFields() method was previously suggested in #520 (comment).

I wonder if this should be a method on the calendar, or maybe we should get the list of fields from the calendar and then remove 'day'.

Originally posted by @sffc in #638

One way to do it would be to pass a list of fields into the method and the calendar would return a modified list of fields. E.g.

JapaneseCalendar.prototype.getFields = function(fields) {
  if ('year' in fields)
    fields.push('era')
  return fields;
}

(only without modifying the original array)

@ptomato ptomato mentioned this issue Jun 11, 2020
4 tasks
@ptomato ptomato added this to the Stable proposal milestone Sep 17, 2020
@ptomato ptomato added documentation Additions to documentation spec-text Specification text involved non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! labels Sep 18, 2020
@ptomato ptomato self-assigned this Oct 17, 2020
ptomato added a commit that referenced this issue Oct 19, 2020
These are not done yet, but in order for the spec changes for the fields()
method to make sense, they at least need to be marked as such.

See: #666
ptomato added a commit that referenced this issue Oct 19, 2020
This is reflected in the polyfill but not yet in the spec. It's also not
complete, since it will change anyway due to #522, but it's enough to make
the spec changes for calendar.fields make sense.

See: #666
ptomato added a commit that referenced this issue Oct 19, 2020
The Calendar.fields method is called whenever Temporal needs to determine
if a calendar object requires extra fields to uniquely identify its date.

Closes: #666
ptomato added a commit that referenced this issue Oct 19, 2020
These are not done yet, but in order for the spec changes for the fields()
method to make sense, they at least need to be marked as such.

See: #666
ptomato added a commit that referenced this issue Oct 19, 2020
This is reflected in the polyfill but not yet in the spec. It's also not
complete, since it will change anyway due to #522, but it's enough to make
the spec changes for calendar.fields make sense.

See: #666
ptomato added a commit that referenced this issue Oct 19, 2020
The Calendar.fields method is called whenever Temporal needs to determine
if a calendar object requires extra fields to uniquely identify its date.

Closes: #666
ptomato added a commit that referenced this issue Oct 19, 2020
The Calendar.fields method is called whenever Temporal needs to determine
if a calendar object requires extra fields to uniquely identify its date.

Closes: #666
ptomato added a commit that referenced this issue Oct 22, 2020
These are not done yet, but in order for the spec changes for the fields()
method to make sense, they at least need to be marked as such.

See: #666
ptomato added a commit that referenced this issue Oct 22, 2020
This is reflected in the polyfill but not yet in the spec. It's also not
complete, since it will change anyway due to #522, but it's enough to make
the spec changes for calendar.fields make sense.

See: #666
ptomato added a commit that referenced this issue Oct 22, 2020
The Calendar.fields method is called whenever Temporal needs to determine
if a calendar object requires extra fields to uniquely identify its date.

Closes: #666
ptomato added a commit that referenced this issue Oct 22, 2020
The Calendar.fields method is called whenever Temporal needs to determine
if a calendar object requires extra fields to uniquely identify its date.

Closes: #666
Ms2ger pushed a commit that referenced this issue Oct 23, 2020
These are not done yet, but in order for the spec changes for the fields()
method to make sense, they at least need to be marked as such.

See: #666
Ms2ger pushed a commit that referenced this issue Oct 23, 2020
This is reflected in the polyfill but not yet in the spec. It's also not
complete, since it will change anyway due to #522, but it's enough to make
the spec changes for calendar.fields make sense.

See: #666
Ms2ger pushed a commit that referenced this issue Oct 23, 2020
The Calendar.fields method is called whenever Temporal needs to determine
if a calendar object requires extra fields to uniquely identify its date.

Closes: #666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Additions to documentation non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! spec-text Specification text involved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant