Commit fdf4b1e7 authored by Shuai Meng's avatar Shuai Meng Committed by Alexandre Julliard

vbscript: Implemented Time.

parent 88d7f611
......@@ -1418,8 +1418,20 @@ static HRESULT Global_Date(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
static HRESULT Global_Time(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{
FIXME("\n");
return E_NOTIMPL;
SYSTEMTIME lt;
UDATE ud;
DATE time;
HRESULT hres;
TRACE("\n");
GetLocalTime(&lt);
ud.st = lt;
ud.wDayOfYear = 0;
hres = VarDateFromUdateEx(&ud, 0, VAR_TIMEVALUEONLY, &time);
if(FAILED(hres))
return hres;
return return_date(res, time);
}
static HRESULT Global_Day(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......
......@@ -1238,5 +1238,6 @@ 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 ok(getVT(Time) = "VT_DATE", "getVT(Time) = " & getVT(Time))
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