Use nl_langinfo() for month and day names

Use the locale setting to fetch the month names and abbreviated day
names.

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lars Henriksen
2017-08-27 10:23:36 +02:00
committed by Lukas Fleischer
parent fad4a5f4e0
commit 26aeddd490
3 changed files with 8 additions and 35 deletions

View File

@@ -71,36 +71,10 @@ int want_reload = 0;
const char *datefmt_str[DATE_FORMATS];
/*
* variables to store calendar names
* variable to store month lengths
*/
int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
const char *monthnames[12] = {
N_("January"),
N_("February"),
N_("March"),
N_("April"),
N_("May"),
N_("June"),
N_("July"),
N_("August"),
N_("September"),
N_("October"),
N_("November"),
N_("December")
};
const char *daynames[8] = {
N_("Sun"),
N_("Mon"),
N_("Tue"),
N_("Wed"),
N_("Thu"),
N_("Fri"),
N_("Sat"),
N_("Sun")
};
/*
* variables to store data path names, which are initialized in
* io_init()