diff options
author | Patrick Hurst <phurst@mit.edu> | 2013-12-05 11:36:54 -0500 |
---|---|---|
committer | Patrick Hurst <phurst@mit.edu> | 2013-12-05 11:36:54 -0500 |
commit | 90c266db553a99056e0baac98df05f06c34de4ae (patch) | |
tree | 522d24017236006718a02bf6e4c092f567c7888b /src/c | |
parent | 5892c59cc4dd947692ff1503b39ab7dc4e02037b (diff) |
Day of week functions.
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 5 |
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) { |