UNIX timestamp and other calendars

hi, i try to translate charts of highcharts.com to Jalali Calendar. highchart use unixtime stamp for point and tick position . but when i convert dates to jalali i have a big problem.
current year in jalali is 1391 and current year in Gregorian is 2012 . by default high chart using time stamp so :

var date = new Date() - new Date(1970,01,01,0,0,0,0);


var date = new Date();

and the result is 42 year diffrent between unix timestamp and Gregorian . but in jalali the problem come :
1391 - 1970 = -579 and highchart get error.
how can i fix problem of unixtime stamp and other calandars ?
can i write getTime Method that work with jalali date of 1970 ? (1348,10,11) ?
sorry for my bad english language.

Sorry, but JavaScript only uses gregorian for its dates. You would need to convert from Jalila to Gregorian, and use the the Gregorian dates throughout JavaScript.

you right , at first i convert to jalali with this . i i only convert date and day and month everything ok but when i convert year to jalali everything go wrong.i need when selection navigation thick yaer in [URL=“http://www.highcharts.com/stock/demo/area”]http://www.highcharts.com/stock/demo/area it show me first month of jalali not first month of Gregorian . so i need to convert years .

Which implies that all you need is to apply a Facade pattern, so that the internal Gregorian dates can be retrieved for display on the page as Jalali dates, and are converted from the displayed Jalali dates to Gregorian dates for the script to use.