-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Dates API: Allow n * Dates.Minute
etc.
#13840
Comments
I'm not clear on what 1) and 2) are doing that the current |
@malmaud RE 2) however, it's a question of readability, and simplicity. Of course, if you wish to expressing an exact number of minutes and seconds is important, then It's really more of a style thing, than functionality. |
Alright, maybe you could change the title of this issue to reflect that it's now about the Dates API. |
n * Dates.Minute
etc.
Closing as dup of #10449 |
In reference to issue #13763, it occurred to me that it might be worth considering borrowing a couple of other features from Go which also relate to
select
statements. Namely:Add something likeAlready exists in the form ofafter(::Dates.Period)
which yields aChannel
which provides a single value after that period of time.Timer
s.Integer
orAbstractFloat
by a subtype ofDates.Period
to get the number of seconds that duration represents, as a number or aTimePeriod
object.e.g:
4 * Dates.Second
=>4
;1.255 * Dates.Minute
=>75.3
You would then, for instance, be able to do things like this:
sleep(5 * Dates.Minute)
The text was updated successfully, but these errors were encountered: