Use the locale's preferred date format for daychange notifications.

Locale data was already used for formatting dates, but the result is more or less awkward, depending on language.
This commit will change the formatting of the "Day changed to ..." line even for English.
This commit is contained in:
Lauri Nurmi 2016-01-31 21:32:17 +02:00
commit 2709b9433d
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ FORMAT_REC fecommon_core_formats[] = {
{ "line_start_irssi", "{line_start}{hilight Irssi:} ", 0 }, { "line_start_irssi", "{line_start}{hilight Irssi:} ", 0 },
{ "timestamp", "{timestamp $Z} ", 0 }, { "timestamp", "{timestamp $Z} ", 0 },
{ "servertag", "[$0] ", 1, { 0 } }, { "servertag", "[$0] ", 1, { 0 } },
{ "daychange", "Day changed to %%d %%b %%Y", 0 }, { "daychange", "Day changed to %%x", 0 },
{ "talking_with", "You are now talking with {nick $0}", 1, { 0 } }, { "talking_with", "You are now talking with {nick $0}", 1, { 0 } },
{ "refnum_too_low", "Window number must be greater than 1", 0 }, { "refnum_too_low", "Window number must be greater than 1", 0 },
{ "error_server_sticky", "Window's server is sticky and it cannot be changed without -unsticky option", 0 }, { "error_server_sticky", "Window's server is sticky and it cannot be changed without -unsticky option", 0 },

View file

@ -310,7 +310,7 @@ int main(int argc, char **argv)
before this call. before this call.
locales aren't actually used for anything else than autodetection locales aren't actually used for anything else than autodetection
of UTF-8 currently.. of UTF-8 and date formatting at daychange currently..
furthermore to get the users's charset with g_get_charset() properly furthermore to get the users's charset with g_get_charset() properly
you have to call setlocale(LC_ALL, "") */ you have to call setlocale(LC_ALL, "") */