From 0cbdfdd6c0ef9a1b72070ee741be76332491392a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 30 Jan 2019 00:42:03 +0000 Subject: Fix non-translated days of the week (#1455). --- src/lib/util.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index ac1c96f97..0ad575b55 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -839,6 +839,29 @@ utf8_strlen (string s) return N; } +string +day_of_week_to_string (boost::gregorian::greg_weekday d) +{ + switch (d.as_enum()) { + case boost::date_time::Sunday: + return _("Sunday"); + case boost::date_time::Monday: + return _("Monday"); + case boost::date_time::Tuesday: + return _("Tuesday"); + case boost::date_time::Wednesday: + return _("Wednesday"); + case boost::date_time::Thursday: + return _("Thursday"); + case boost::date_time::Friday: + return _("Friday"); + case boost::date_time::Saturday: + return _("Saturday"); + } + + return d.as_long_string (); +} + #ifdef DCPOMATIC_VARIANT_SWAROOP /* Make up a key from the machine UUID */ -- cgit v1.2.3