sproutcore/sproutcore20 — pull request #220 by workmanw (2011-11-29 03:39:36+00:00)
Title: SC.DateTime should invoke class methods using 'this' instead of 'SC.DateTime'.

I've modified SC.DateTime to invoke class methods using 'this' instead of 'SC.DateTime'. This allows SC.DateTime to be extended for use in other apps and frameworks. Additionally added unit tests to verify it.

The particular offender here was SC.DateTime#parse. After it parses the date value from the string it invoked SC.DateTime.create, rather than this.create. This resulted in our subclass of SC.DateTime, call it Our.DateTime, always producing SC.DateTime objects when we invoked Our.DateTime.create.