Martin Ström
my-domain.se

Prototype & Script.aculo.us SVN checkins RSS feed

Thanks to Yahoo Pipes I created two RSS feeds for the Ruby on Rails checkins (changesets). One containing only the Rails-spinoffs checkins (that is Prototype and Script.aculo.us right now) and another without the spinoffs. This way I can follow the JavaScript-related changes as they happen but watch the Ruby-stuff every now and then.


Rails' time extensions ported to JavaScript

I’ve ported Rails’ Numeric Time extensions to JavaScript since I needed to do some date calculations for a project I’m working on. Now one should be able to calculate dates in JS like this:

(5).seconds() // => 5000
(2).weeks() + (2).hours() + (15).seconds() // => 1216815000
(1).week().fromNow().toDate() // => Fri Sep 22 2006 19:16:32 GMT+0200 (CEST)
var date = new Date(2000, 11, 18, 18, 15, 23);
(2).years().since(date).toDate() // => Thu Dec 19 2002 06:15:23 GMT+0100 (CET)

Thought it could be useful for others as well. You’ll need the latest prototype library, unit tests are included.

Download a zip with both .js file and unit tests or just the .js-file.


TextMate Prototype & Scriptaculous Bundle

This the first version of a TextMate bundle for Prototype and script.aculo.us JavaScript libraries. The language grammar is based on from Justin Palmers Prototype Bundle but the other commands/snippets are all new. Please let me know if you have any comments and/or improvements.

Download here

Update 2006-07-16

The bundle is now added to TextMates official svn repository.

CSS is in progress