Mercurial > urweb
diff src/c/urweb.c @ 1973:155bd0bc4d28
Day of week functions.
author | Patrick Hurst <phurst@mit.edu> |
---|---|
date | Thu, 05 Dec 2013 11:36:54 -0500 |
parents | 1e360ea06a09 |
children | 81bc76aa4acd |
line wrap: on
line diff
--- a/src/c/urweb.c Thu Dec 05 11:36:46 2013 -0500 +++ b/src/c/urweb.c Thu Dec 05 11:36:54 2013 -0500 @@ -3894,6 +3894,11 @@ 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) {