summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Patrick Hurst <phurst@mit.edu>2013-12-05 11:36:54 -0500
committerGravatar Patrick Hurst <phurst@mit.edu>2013-12-05 11:36:54 -0500
commit90c266db553a99056e0baac98df05f06c34de4ae (patch)
tree522d24017236006718a02bf6e4c092f567c7888b /src/c
parent5892c59cc4dd947692ff1503b39ab7dc4e02037b (diff)
Day of week functions.
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index cb71aa15..fb6d28c6 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -3894,6 +3894,11 @@ uw_Basis_int uw_Basis_datetimeSecond(uw_context ctx, uw_Basis_time time) {
return tm.tm_sec;
}
+uw_Basis_int uw_Basis_datetimeDayOfWeek(uw_context ctx, uw_Basis_time time) {
+ struct tm tm;
+ gmtime_r(&time.seconds, &tm);
+ return tm.tm_wday;
+}
void *uw_get_global(uw_context ctx, char *name) {