Display the timezone offsets for two different dates : getTimezoneOffset : Date JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Date » getTimezoneOffset »

 

Display the timezone offsets for two different dates

















<html>
    <script language="JavaScript">
    <!--
    //Create 2 very different date objects
    aDate1 = new Date(1990,1,1,0,0,0,0);
    aDate2 = new Date(1994,2,13,8,24,45,300);
    //
    document.write("The timezone offset of aDate1 is ");
    document.write(aDate1.getTimezoneOffset()," minutes.<br>");
    document.write("The timezone offset of aDate2 is "
    document.write(aDate2.getTimezoneOffset()," minutes.");
    -->
    </script>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Date
» getTimezoneOffset