Commit d3597931 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Add Minute function implementation.

parent cb16190e
...@@ -1659,8 +1659,13 @@ static HRESULT Global_Hour(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI ...@@ -1659,8 +1659,13 @@ static HRESULT Global_Hour(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
static HRESULT Global_Minute(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) static HRESULT Global_Minute(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
{ {
FIXME("\n"); SYSTEMTIME st;
return E_NOTIMPL; HRESULT hres;
TRACE("(%s)\n", debugstr_variant(arg));
hres = to_system_time(arg, &st);
return FAILED(hres) ? hres : return_short(res, st.wMinute);
} }
static HRESULT Global_Second(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) static HRESULT Global_Second(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......
...@@ -1451,6 +1451,9 @@ Call ok(Year(2) = 1900, "Year(2) = " & Year(2)) ...@@ -1451,6 +1451,9 @@ Call ok(Year(2) = 1900, "Year(2) = " & Year(2))
Call ok(getVT(Hour(now)) = "VT_I2", "getVT(Hour(now)) = " & getVT(Hour(now))) Call ok(getVT(Hour(now)) = "VT_I2", "getVT(Hour(now)) = " & getVT(Hour(now)))
Call ok(Hour(2) = 0, "Hour(2) = " & Hour(2)) Call ok(Hour(2) = 0, "Hour(2) = " & Hour(2))
Call ok(Hour(2.75) = 18, "Hour(2) = " & Hour(2.75)) Call ok(Hour(2.75) = 18, "Hour(2) = " & Hour(2.75))
Call ok(getVT(Minute(now)) = "VT_I2", "getVT(Minute(now)) = " & getVT(Minute(now)))
Call ok(Minute(2) = 0, "Minute(2) = " & Minute(2))
Call ok(Minute(2.02083) = 30, "Minute(2.02083) = " & Minute(2.02083))
Sub testRGBError(arg1, arg2, arg3, error_num) Sub testRGBError(arg1, arg2, arg3, error_num)
on error resume next on error resume next
......
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