diff options
author | KirieZ <guilherme.menaldo@outlook.com> | 2017-03-05 20:23:30 -0300 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-07-11 12:52:32 +0200 |
commit | 79b69495bbc5d758529a485eb1144bd64b8ea50f (patch) | |
tree | 26e9f4ebe5396fe040a31739af9d4d17bdbb162e /src/map/date.c | |
parent | af099be50ad275c55bfb07831213f4540ae265d7 (diff) | |
download | hercules-79b69495bbc5d758529a485eb1144bd64b8ea50f.tar.gz hercules-79b69495bbc5d758529a485eb1144bd64b8ea50f.tar.bz2 hercules-79b69495bbc5d758529a485eb1144bd64b8ea50f.tar.xz hercules-79b69495bbc5d758529a485eb1144bd64b8ea50f.zip |
Added getcalendartime script command
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/date.c')
-rw-r--r-- | src/map/date.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/date.c b/src/map/date.c index a20578e51..20ab9fe95 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -77,6 +77,13 @@ int date_get_sec(void) return lt->tm_sec; } +int date_get_dayofweek(void) +{ + time_t t = time(NULL); + struct tm *lt = localtime(&t); + return lt->tm_wday; +} + /*========================================== * Star gladiator related checks *------------------------------------------*/ |