Implementation of php strtotime in javascript for YUI