WINTERMUTE: Make use of the wday-field in dates, instead of a wrong mday-value.

This commit is contained in:
Einar Johan Trøan Sømåen 2012-08-15 02:36:08 +02:00
parent 10ca0f136d
commit eacb0b1698

View File

@ -127,8 +127,7 @@ bool SXDate::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetWeekday") == 0) {
stack->correctParams(0);
warning("GetWeekday returns a wrong value on purpose");
stack->pushInt(_tm.tm_mday % 7);
stack->pushInt(_tm.tm_wday);
return STATUS_OK;
}