libpurple/util.c

changeset 39016
4fe6d7a3e6ff
parent 38998
5d5fb6bce103
child 39017
4c9d510555b5
equal deleted inserted replaced
39015:bb929248da3d 39016:4fe6d7a3e6ff
1060 if (count == 2) { 1060 if (count == 2) {
1061 /* Two-digits only */ 1061 /* Two-digits only */
1062 g_string_append(string, purple_utf8_strftime("%y", tm)); 1062 g_string_append(string, purple_utf8_strftime("%y", tm));
1063 } else { 1063 } else {
1064 /* Zero-padding */ 1064 /* Zero-padding */
1065 char *tmp = g_strdup_printf("%%0%dY", count); 1065 g_string_append_printf(string, "%0*d",
1066 g_string_append(string, purple_utf8_strftime(tmp, tm)); 1066 count,
1067 g_free(tmp); 1067 tm->tm_year + 1900);
1068 } 1068 }
1069 break; 1069 break;
1070 1070
1071 /* Year (in "Week of Year" based calendars) */ 1071 /* Year (in "Week of Year" based calendars) */
1072 case 'Y': 1072 case 'Y':

mercurial