#include "DateConversion.h"
#include "CallFrame.h"
+#include "JSObject.h"
+#include "ScopeChain.h"
#include "UString.h"
#include <wtf/DateMath.h>
#include <wtf/StringExtras.h>
+#include <wtf/text/CString.h>
using namespace WTF;
{
if (date == exec->globalData().cachedDateString)
return exec->globalData().cachedDateStringValue;
- double value = parseDateFromNullTerminatedCharacters(exec, date.UTF8String().data());
+ double value = parseES5DateFromNullTerminatedCharacters(date.utf8().data());
+ if (isnan(value))
+ value = parseDateFromNullTerminatedCharacters(exec, date.utf8().data());
exec->globalData().cachedDateString = date;
exec->globalData().cachedDateStringValue = value;
return value;