from xpdatetime.c to support more date string formats (e.g. the JavaScript Date.toISOString() format).