Yeah I can't see the extensions to number being added to core due to bloat,
what about the alternateSucc idea on range?
Still add the prototype.date.succ() but make the change to range and add a
few extra succ functions for dates and you can then iterate mins or whatever
as well.
Gareth
On 3/11/
> Don't know from where i got that link
Probably from trac ;-)
http://dev.rubyonrails.org/ticket/6342
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to
After reading the source, I think the correct implementation would be to
allow you to specify an overriding succ function on the objectrange
constructor that is used instead of
_each: function(iterator) {
var value = this.start;
while (this.include(value)) {
iterator(value);
*value = value.succ();
I agree it would be useful to be able to iterate in a range for more than
just days, and the extensions look good- possibly too wordy?
What's wrong with "dateadd"?
:)
Anyway, how would you implement iteration between a range where you could
specify the interval to iterate?
here's an idea.. specif
Regarding time calculations etc, here is something that i would like
to see being added:
http://burnfield.com/martin/2006/09/15/rails-time-extensions-ported-to-javascript/
Don't know from where i got that link but it's a great set of tools
when dealing with times. As the link says it's a port of
Yeah, I was thinking about that but I couldn't see how to implement it in a
nice prototype-friendly way so just cross posted to leave it with you guys.
Sorry, no unit tests or anything, just wanted to bring your attention to it.
Gareth
On 3/11/07, Tobie Langel <[EMAIL PROTECTED]> wrote:
>
>
> S
Sounds like a great idea.
Deserves a ticket IMHO.
The only issue I see is if you need to iterate over hours, minutes or
months instead of days.
Regards,
Tobie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Pr