highslide-software/highcharts.com — pull request #3313 by tahajahangir (2014-08-04 11:54:35+00:00)
Title: Allow changing `Date` class used to support other calendars

I worked a lot to make highstock charts with non-gregorian dates. Changing `dateFormats` is not sufficient because some features like YTD zoom option and date input-boxes still works in gregorian calendar.

I found that the best way for changing highstock calendar, is changing the `Date` class entirely. Fortunately, in source files, Date class is used in the best way, and hacking `window.Date` with another Date-like class is sufficient to change calendar.

This is a Date-like class for Persian calendar: [JDate](https://github.com/tahajahangir/jdate). And there is [highstock demo](http://tahajahangir.github.io/jdate/jalali-highcharts-demo.html) that demonstrates the use of this class.

In this two-line change, an option is made to change the `Date` class in use. ant lint is running successfully, and size of minified files is reduced (because Date is now a local variable)