Added year day return in gettime function. gettime(8) returns 1~366

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5816 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
foruken 2006-03-30 18:09:09 +00:00
parent 71ae46e3b6
commit 57ce40d17a
3 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/03/30 2006/03/30
* Added year day return in gettime function. gettime(8) returns 1~366
[Foruken]
* the auth function in login.c won't jstrescapecpy passwords that were * the auth function in login.c won't jstrescapecpy passwords that were
encrypted. Thanks to foobar. (but are still more cases to check for? Dunno, encrypted. Thanks to foobar. (but are still more cases to check for? Dunno,
the code is kinda long...) [Skotlex] the code is kinda long...) [Skotlex]

View File

@ -2731,8 +2731,9 @@ This function will return specified information about the current system time.
3 - Hour (of a day) 3 - Hour (of a day)
4 - Week day (0 for Sunday, 6 is Saturday) 4 - Week day (0 for Sunday, 6 is Saturday)
5 - Day of the month. 5 - Day of the month.
6 - Number of the month 6 - Number of the month.
7 - Year 7 - Year.
8 - Day of the year.
It will only return numbers. It will only return numbers.

View File

@ -5275,6 +5275,9 @@ int buildin_gettime(struct script_state *st) /* Asgard Version */
case 7://Year(20xx) case 7://Year(20xx)
push_val(st->stack,C_INT,t->tm_year+1900); push_val(st->stack,C_INT,t->tm_year+1900);
break; break;
case 8://Year Day(01~366)
push_val(st->stack,C_INT,t->tm_yday+1);
break;
default://(format error) default://(format error)
push_val(st->stack,C_INT,-1); push_val(st->stack,C_INT,-1);
break; break;