summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-23 13:40:04 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-23 13:40:04 +0200
commit7c86dcaa270fd624d93fb73316052f1007aa7d85 (patch)
tree29db5090d8194de200064976d0f5a193b18d8f4b /tools.c
parentd66eba77c272b55b39f70eac48f616f5692590c5 (diff)
downloadvdr-7c86dcaa270fd624d93fb73316052f1007aa7d85.tar.gz
vdr-7c86dcaa270fd624d93fb73316052f1007aa7d85.tar.bz2
Added WeekDayNameFull()1.5.5
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index dd2395ad..edff762a 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.129 2007/06/17 11:02:34 kls Exp $
+ * $Id: tools.c 1.130 2007/06/23 13:38:30 kls Exp $
*/
#include "tools.h"
@@ -871,6 +871,27 @@ cString WeekDayName(time_t t)
return WeekDayName(localtime_r(&t, &tm_r)->tm_wday);
}
+cString WeekDayNameFull(int WeekDay)
+{
+ WeekDay = WeekDay == 0 ? 6 : WeekDay - 1; // we start with Monday==0!
+ switch (WeekDay) {
+ case 0: return tr("Monday");
+ case 1: return tr("Tuesday");
+ case 2: return tr("Wednesday");
+ case 3: return tr("Thursday");
+ case 4: return tr("Friday");
+ case 5: return tr("Saturday");
+ case 6: return tr("Sunday");
+ }
+ return "???";
+}
+
+cString WeekDayNameFull(time_t t)
+{
+ struct tm tm_r;
+ return WeekDayNameFull(localtime_r(&t, &tm_r)->tm_wday);
+}
+
cString DayDateTime(time_t t)
{
char buffer[32];