I am querying facebook graph api. It returns date in following format: 2012-01-23T23:52:29+0000.
I need to find difference of dates of this type in javascript. It's not a valid date in javascript ( by Date.parse() or new Date() )
I am thinking of replacing 'T' with ' ' (a space), '-' with '/' and '+0000' with '' (empty string). Is this the only way? Or am I missing something here?
Also, if this is the only way, can someone give me a regex to replace all in one go?
Execution speed is my main concern.