From 90c266db553a99056e0baac98df05f06c34de4ae Mon Sep 17 00:00:00 2001 From: Patrick Hurst Date: Thu, 5 Dec 2013 11:36:54 -0500 Subject: Day of week functions. --- src/c/urweb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3