mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Make gnc-dense-cal:month_name to use g_date_strftime instead of strftime
so that it returns a clean UTF-8 string. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15080 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4605519e70
commit
b3f2483ec6
@ -167,13 +167,14 @@ static GtkWidgetClass *parent_class = NULL;
|
|||||||
static const gchar *month_name(int mon)
|
static const gchar *month_name(int mon)
|
||||||
{
|
{
|
||||||
static gchar buf[MONTH_NAME_BUFSIZE];
|
static gchar buf[MONTH_NAME_BUFSIZE];
|
||||||
struct tm my_tm;
|
GDate *date;
|
||||||
int i;
|
|
||||||
|
memset(buf, 0, MONTH_NAME_BUFSIZE);
|
||||||
|
date = g_date_new();
|
||||||
|
g_date_set_month(date, mon);
|
||||||
|
g_date_strftime(buf, MONTH_NAME_BUFSIZE-1, "%b", date);
|
||||||
|
g_date_free(date);
|
||||||
|
|
||||||
memset( buf, 0, MONTH_NAME_BUFSIZE );
|
|
||||||
memset( &my_tm, 0, sizeof( struct tm ) );
|
|
||||||
my_tm.tm_mon = mon;
|
|
||||||
i = strftime (buf, MONTH_NAME_BUFSIZE-1, "%b", &my_tm);
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
/* FIXME: i18n
|
/* FIXME: i18n
|
||||||
|
Loading…
Reference in New Issue
Block a user