vbscript: Implemented Date.
This commit is contained in:
parent
ad012a8a57
commit
88d7f611a4
|
@ -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)
|
static HRESULT Global_Date(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
SYSTEMTIME lt;
|
||||||
return E_NOTIMPL;
|
UDATE ud;
|
||||||
|
DATE date;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
|
GetLocalTime(<);
|
||||||
|
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)
|
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(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(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()
|
Call reportSuccess()
|
||||||
|
|
Loading…
Reference in New Issue