-
Notifications
You must be signed in to change notification settings - Fork 22.7k
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
[Temporal] Potential issue in docs: "year is an integer that may be zero or negative, which increases monotonously with time." #37996
Comments
@Josh-Cena FYI RE: this request for review |
From a quick/naive skim of the spec, there definitely seems to be some stuff that talks about negatives in relation to
Though it feels like that might be more relevantly covered by this next part in the MDN docs:
|
It's unsurprising that |
@Josh-Cena Agreed, that was my default assumption; but then when 'zero' and 'negative' were explicitly called out, it started to make me question that assumption; and then wonder if the docs were wrong, or if the 'positive' case was left out because it was obvious, or because it wasn't supported (which I assumed couldn't have been the case), etc.
Some quick iterating with ChatGPT 4o, the first basic example was just adding in 'positive' to remove the ambiguity:
But given the default assumption that its positive, that didn't quite feel like it flowed as nicely, so came up with this variation that gives more precedence to the 'usually its positive, but not always' vibe:
And then for the latter edit I made to my initial post RE: the wording in the following paragraph; if I wanted to remove all chance of ambiguity, I might change from:
To:
I think if the changes were made to |
PRs are welcome :) |
@Josh-Cena Too easy, shall knock one up shortly :) |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars
What specific section or headline is this issue about?
Calendars
What information was incorrect, unhelpful, or incomplete?
I'm not sure if this is correct as is, but given the other context around it, the fact that it mentions that it can be negative felt strange, so wanted to confirm/clarify if that was intended or a typo:
I wonder if instead of:
It should be:
The following paragraph goes on to talk about
0
or1
being the start epoch; and then formonth
andday
, it talks about either "intereger" or "also a positive integer":It's a little ambiguous to me whether the 'also' in "also a positive integer" for
day
is referring tomonth
being positive (which isn't explicitly stated), or whether its intended to imply that bothmonth
andyear
are positive (which would be at odds with the 'negative' part that this issue is about)What did you expect to see?
If it is correct as is, then I guess it feels a bit weird that it mentions zero or negative explicitly, but then can obviously hold positives as well.
If it is incorrect as is, and negatives aren't allowed, then I would expect it to say "zero or positive".
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/javascript/reference/global_objects/temporal
The text was updated successfully, but these errors were encountered: