Commit 88d7f611 authored by Shuai Meng's avatar Shuai Meng Committed by Alexandre Julliard

vbscript: Implemented Date.

parent ad012a8a
......@@ -1400,8 +1400,20 @@ static HRESULT Global_Now(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static HRESULT Global_Date(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
SYSTEMTIME lt;
UDATE ud;
DATE date;
HRESULT hres;
TRACE("\n");
GetLocalTime(&lt);
ud.st = lt;
ud.wDayOfYear = 0;
hres = VarDateFromUdateEx(&ud, 0, VAR_DATEVALUEONLY, &date);
if(FAILED(hres))
return hres;
return return_date(res, date);
}
static HRESULT Global_Time(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......
......@@ -1237,4 +1237,6 @@ Call ok(getVT(Log("10")) = "VT_R8", "getVT(Log(""10"")) = " & getVT(Log("10")))
Call ok(Approch(Log(CByte(2)), 0.6931), "Log(CByte(2)) = " & Log(CByte(2)))
Call ok(getVT(Log(CByte(2))) = "VT_R8", "getVT(Log(CByte(2))) = " & getVT(Log(CByte(2))))
Call ok(getVT(Date) = "VT_DATE", "getVT(Date) = " & getVT(Date))
Call reportSuccess()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment