Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1972:56c68443cb9d | 1973:155bd0bc4d28 |
---|---|
3892 struct tm tm; | 3892 struct tm tm; |
3893 gmtime_r(&time.seconds, &tm); | 3893 gmtime_r(&time.seconds, &tm); |
3894 return tm.tm_sec; | 3894 return tm.tm_sec; |
3895 } | 3895 } |
3896 | 3896 |
3897 uw_Basis_int uw_Basis_datetimeDayOfWeek(uw_context ctx, uw_Basis_time time) { | |
3898 struct tm tm; | |
3899 gmtime_r(&time.seconds, &tm); | |
3900 return tm.tm_wday; | |
3901 } | |
3897 | 3902 |
3898 | 3903 |
3899 void *uw_get_global(uw_context ctx, char *name) { | 3904 void *uw_get_global(uw_context ctx, char *name) { |
3900 int i; | 3905 int i; |
3901 | 3906 |