mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
datetime: Rename g_date_time_printf() to g_date_time_format()
The function does not use any printf() modifiers, so using printf() is a misnomer. Prior art: strftime, g_ascii_formatd https://bugzilla.gnome.org/show_bug.cgi?id=50076
This commit is contained in:
committed by
Ryan Lortie
parent
4bac6613cf
commit
3e9fb52214
@@ -121,10 +121,10 @@
|
||||
#define MONTH_FULL(d) (get_month_name (g_date_time_get_month (datetime)))
|
||||
|
||||
/* Translators: this is the preferred format for expressing the date */
|
||||
#define GET_PREFERRED_DATE(d) (g_date_time_printf ((d), C_("GDateTime", "%m/%d/%y")))
|
||||
#define GET_PREFERRED_DATE(d) (g_date_time_format ((d), C_("GDateTime", "%m/%d/%y")))
|
||||
|
||||
/* Translators: this is the preferred format for expressing the time */
|
||||
#define GET_PREFERRED_TIME(d) (g_date_time_printf ((d), C_("GDateTime", "%H:%M:%S")))
|
||||
#define GET_PREFERRED_TIME(d) (g_date_time_format ((d), C_("GDateTime", "%H:%M:%S")))
|
||||
|
||||
#define SECS_PER_MINUTE (60)
|
||||
#define SECS_PER_HOUR (60 * SECS_PER_MINUTE)
|
||||
@@ -2237,7 +2237,7 @@ g_date_time_new_now (void)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_date_time_printf:
|
||||
* g_date_time_format:
|
||||
* @datetime: A #GDateTime
|
||||
* @format: a valid UTF-8 string, containing the format for the #GDateTime
|
||||
*
|
||||
@@ -2293,7 +2293,7 @@ g_date_time_new_now (void)
|
||||
* Since: 2.26
|
||||
*/
|
||||
gchar *
|
||||
g_date_time_printf (const GDateTime *datetime,
|
||||
g_date_time_format (const GDateTime *datetime,
|
||||
const gchar *format)
|
||||
{
|
||||
GString *outstr;
|
||||
|
Reference in New Issue
Block a user