Timezone script..
|
|
Can someone help me making a script that grabs times in the html source and adds some hours , i dont know regex so is hard for me to grab a data .. but i know a bit of javascript example .. <td>2008-07-30 05:32</td> i want to grab yyyy-mm-dd hh.MM and save it as variables .. var year = 2008; //YYYY
after i try to make cicles to add or remove some hours .. and at the end i want to replace the old time , whit the new time. I need this script to fix ours in some sites that use different time zone. Sry for my bad english. |
|
|
Have you tried to use the Date object of javascript, it can parse also strings |
|
|
I've done something similar to this by using var parts = myDate.replace(/[\s:]/g, "-").split("-");
var year = parts[0];
var month = parts[1];
etc..
|
