diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-01-30 00:42:03 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-01-30 00:42:03 +0000 |
| commit | 0cbdfdd6c0ef9a1b72070ee741be76332491392a (patch) | |
| tree | 119f906981a3b17989fcce8c114aa00ec66f194a /src/lib/util.cc | |
| parent | 072658c553eff4103bc962eec8b3b83aa05210ea (diff) | |
Fix non-translated days of the week (#1455).
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 23 |
1 files changed, 23 insertions, 0 deletions
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 */ |
