We can convert any date object to local string by using toLcaleDateString like this
<script type="text/javascript">
The output is here
Fri Mar 02 2012 13:26:30 GMT+0530 (IST)
What is the difference between toDateString and toLocaleDateString. Here is a comparison
<script type="text/javascript">
Check different outputs here
Fri Mar 02 2012 13:26:30 GMT+0530 (IST)
No comments:
Post a Comment