-
Notifications
You must be signed in to change notification settings - Fork 103
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
Plurals vs singulars in ordinals #210
Comments
I think the following generally holds:
(Interesting sidenote is that this illustrates For this reason Ultimately this implies that the singular returns the range between two points in time [In this particular case it would be implied that the range returned is the second (starting and ending at integer seconds since the epoch) in which the |
I recall giving some thought to this in designing some of our own time-related APIs. I don't recall all the details, but I like the look of the post above, which reminds me of this comment from Stephen Colebourne and this other comment from Stephen Colebourne. My take, which I think may be compatible with the previous post, but I am confusing myself as I dig through old links... :)
My understanding is that the [edit: one other link] |
Thank you both! I've read everything you wrote, and I think it can be boiled down to this point:
We already have So, this looks like a strong argument for using singulars in such names. |
Some other precedents:
Note that months, days, hours, minutes, and seconds are counted cyclically, but differ in rules regarding this. So, the split seems to be between date components and time components. Thus, "second-of-epoch 1" could also sensibly mean that a whole second passed, if we treat it the same way the time components are treated on the clock. That said, in English, there only seems to be a single commonly known case when we count something continuously from a reference point, and that would be the years, which are denoted by their ordinals. Going by this, for seconds since the epoch, maybe plural is also a sensible choice. |
I think something else that's worth noting is that in all cases where a 0 value exists, the unit is 0-indexed. The time components all have a |
I think we did find what we were looking for in this discussion. Thank you all again! |
This issue is for gathering inputs from people with an intuitive understanding of English to help us name things.
Preliminaries: we have
Instant.epochSeconds
, which returns the number of seconds that passed since the Unix epoch. On the epoch itself and after some number of nanoseconds that don't amount to a whole second,Instant.epochSeconds
returns 0.Other libraries, like
java.time
, provide the same functionality, but with a slightly different name:Instant.epochSecond
(note it being singular). We assume that the idea behind this is "the nth second since the epoch".However, colloquially, the nth second/etc. is the second/etc. that goes on before
n
whole seconds/etc. have passed. For example, January is the first month of the year, that is, the month that goes on before a whole month has passed.Questions for the readers:
Instant.epochSecond == 1
, what do you think it means—does it mean that it is the first second since the start of the epoch, or that 1 full second has passed since then?Instant.epochSeconds
. Does this naming seem natural, or slightly odd?LocalTime.secondOfDay
andLocalTime.secondsOfDay
: do they mean the same thing to you, or do you feel the first one is an ordinal, but the second one is the count?The text was updated successfully, but these errors were encountered: