ui, libi2ncommon, intranator-language: (tomj) fancy display of proxy database filenam...
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 29 Jun 2006 12:03:17 +0000 (12:03 +0000)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 29 Jun 2006 12:03:17 +0000 (12:03 +0000)
src/timefunc.cpp
src/timefunc.hxx

index 9508e71..fb5e672 100644 (file)
@@ -302,3 +302,54 @@ std::string WEEK::get_english_display(WEEKDAY day)
 
     return weekday_str;
 }
+
+string get_month_name(unsigned char month)
+{
+    string rtn;
+    switch(month) {
+        case 1:
+            rtn = i18n("January");
+            break;
+        case 2:
+            rtn = i18n("February");
+            break;
+        case 3:
+            rtn = i18n("March");
+            break;
+        case 4:
+            rtn = i18n("April");
+            break;
+        case 5:
+            rtn = i18n("May");
+            break;
+        case 6:
+            rtn = i18n("June");
+            break;
+        case 7:
+            rtn = i18n("July");
+            break;
+        case 8:
+            rtn = i18n("August");
+            break;
+        case 9:
+            rtn = i18n("September");
+            break;
+        case 10:
+            rtn = i18n("October");
+            break;
+        case 11:
+            rtn = i18n("November");
+            break;
+        case 12:
+            rtn = i18n("December");
+            break;
+        default:
+            {
+                ostringstream out;
+                out << i18n("Illegal month:") << " " << month;
+                rtn = out.str();
+            }
+    }
+
+    return rtn;
+}
index c4a5436..2c0e82c 100644 (file)
@@ -27,6 +27,8 @@ inline std::string output_hour_minute_from_seconds(int seconds)
     return output_hour_minute(hour,minute);
 }
 
+std::string get_month_name(unsigned char month);
+
 class WEEK
 {
     private: