summaryrefslogtreecommitdiff
path: root/src/map/date.c
diff options
context:
space:
mode:
authorKirieZ <guilherme.menaldo@outlook.com>2017-03-05 20:23:30 -0300
committerHaru <haru@dotalux.com>2017-07-11 12:52:32 +0200
commit79b69495bbc5d758529a485eb1144bd64b8ea50f (patch)
tree26e9f4ebe5396fe040a31739af9d4d17bdbb162e /src/map/date.c
parentaf099be50ad275c55bfb07831213f4540ae265d7 (diff)
downloadhercules-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.c7
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
*------------------------------------------*/