jscript: Added Date.toGMTString implementation.
This commit is contained in:
parent
8a68f418db
commit
adc2a5697b
|
@ -675,9 +675,8 @@ static HRESULT Date_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ECMA-262 3rd Edition 15.9.5.42 */
|
static inline HRESULT create_utc_string(script_ctx_t *ctx, vdisp_t *jsthis,
|
||||||
static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
VARIANT *retv, jsexcept_t *ei)
|
||||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
|
||||||
{
|
{
|
||||||
static const WCHAR NaNW[] = { 'N','a','N',0 };
|
static const WCHAR NaNW[] = { 'N','a','N',0 };
|
||||||
static const WCHAR formatADW[] = { '%','s',',',' ','%','d',' ','%','s',' ','%','d',' ',
|
static const WCHAR formatADW[] = { '%','s',',',' ','%','d',' ','%','s',' ','%','d',' ',
|
||||||
|
@ -702,8 +701,6 @@ static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
|
||||||
int len, size, year, day;
|
int len, size, year, day;
|
||||||
DWORD lcid_en, week_id, month_id;
|
DWORD lcid_en, week_id, month_id;
|
||||||
|
|
||||||
TRACE("\n");
|
|
||||||
|
|
||||||
if(!(date = date_this(jsthis)))
|
if(!(date = date_this(jsthis)))
|
||||||
return throw_type_error(ctx, ei, IDS_NOT_DATE, NULL);
|
return throw_type_error(ctx, ei, IDS_NOT_DATE, NULL);
|
||||||
|
|
||||||
|
@ -781,11 +778,19 @@ static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ECMA-262 3rd Edition 15.9.5.42 */
|
||||||
|
static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||||
|
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||||
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
return create_utc_string(ctx, jsthis, retv, ei);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT Date_toGMTString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
static HRESULT Date_toGMTString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
TRACE("\n");
|
||||||
return E_NOTIMPL;
|
return create_utc_string(ctx, jsthis, retv, ei);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ECMA-262 3rd Edition 15.9.5.3 */
|
/* ECMA-262 3rd Edition 15.9.5.3 */
|
||||||
|
|
|
@ -1874,6 +1874,7 @@ testFunctions(Date.prototype, [
|
||||||
["toString", 0],
|
["toString", 0],
|
||||||
["toTimeString", 0],
|
["toTimeString", 0],
|
||||||
["toUTCString", 0],
|
["toUTCString", 0],
|
||||||
|
["toGMTString", 0],
|
||||||
["valueOf", 0]
|
["valueOf", 0]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue