summaryrefslogtreecommitdiff
path: root/src/map/date.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-07-11 12:53:09 +0200
committerHaru <haru@dotalux.com>2017-07-11 12:53:09 +0200
commitaaa2b237b4b24d0565afd375046dd7f4480d91f1 (patch)
tree26e9f4ebe5396fe040a31739af9d4d17bdbb162e /src/map/date.c
parenteef92522dcf835f42a922a580be8f855cfea1aa6 (diff)
parent79b69495bbc5d758529a485eb1144bd64b8ea50f (diff)
downloadhercules-aaa2b237b4b24d0565afd375046dd7f4480d91f1.tar.gz
hercules-aaa2b237b4b24d0565afd375046dd7f4480d91f1.tar.bz2
hercules-aaa2b237b4b24d0565afd375046dd7f4480d91f1.tar.xz
hercules-aaa2b237b4b24d0565afd375046dd7f4480d91f1.zip
Merge pull request #1593 from guilherme-gm/script-setquest
Closes #1593 as merged
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
*------------------------------------------*/