I have a page in which I want to find all datetime values.
I want to find all datetime values and convert them from Hijri datetimes to standard datetimes.
How can I find datetime value with javascript and change it?
For example:
I want this code in html
<td class="ms-vb2"><nobr>18/02/1391 14:07</nobr></td>
I want to find the datetime value (18/02/1391 14:07), then change it to (14/08/2012 10:15) with javascript.
Edit
I use this code and find all date value
var re = /[0-3]\d\/[01]\d\/\d{4}/g;
var dates = $("body").text().match(re);
How to replace it to new date???
You are recurse over all text nodes starting from a particular element using the following (uses
mplungjan’sa simple regular expression):If the intention is to do the entire document, pass it the body element.