[Prototype-core] Re: Prototype.Date.Succ

2007-03-10 Thread Gareth Evans
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:

[Prototype-core] Re: Prototype.Date.Succ

2007-03-10 Thread Kjell Bublitz
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

[Prototype-core] Re: Prototype.Date.Succ

2007-03-10 Thread Gareth Evans
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.. specify

[Prototype-core] Re: Prototype.Date.Succ

2007-03-10 Thread Gareth Evans
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 =

[Prototype-core] Re: Prototype.Date.Succ

2007-03-10 Thread Tobie Langel
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

[Prototype-core] Re: Prototype.Date.Succ

2007-03-10 Thread Gareth Evans
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