mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-05 17:06:18 +01:00
Expand the g_date_time_format documentation
Mention strftime, and explain supported modifiers.
This commit is contained in:
parent
d23c33a04b
commit
e15ecab048
@ -2088,6 +2088,12 @@ get_numeric_format (gchar *fmt,
|
||||
*
|
||||
* Creates a newly allocated string representing the requested @format.
|
||||
*
|
||||
* The format strings understood by this function are a subset of the
|
||||
* strftime() format language. In contrast to strftime(), this function
|
||||
* always produces a UTF-8 string, regardless of the current locale.
|
||||
* Note that the rendering of many formats is locale-dependent and may
|
||||
* not match the strftime() output exactly.
|
||||
*
|
||||
* The following format specifiers are supported:
|
||||
*
|
||||
* <variablelist>
|
||||
@ -2264,6 +2270,41 @@ get_numeric_format (gchar *fmt,
|
||||
* </simpara></listitem></varlistentry>
|
||||
* </variablelist>
|
||||
*
|
||||
* Some conversion specifications can be modified by preceding the
|
||||
* conversion specifier by one or more modifier characters. The
|
||||
* following modifiers are supported for many of the numeric
|
||||
* conversions:
|
||||
* <variablelist>
|
||||
* <varlistentry>
|
||||
* <term>O</term>
|
||||
* <listitem>
|
||||
* Use alternative numeric symbols, if the current locale
|
||||
* supports those.
|
||||
* </listitem>
|
||||
* </varlistentry>
|
||||
* <varlistentry>
|
||||
* <term>_</term>
|
||||
* <listitem>
|
||||
* Pad a numeric result with spaces.
|
||||
* This overrides the default padding for the specifier.
|
||||
* </listitem>
|
||||
* </varlistentry>
|
||||
* <varlistentry>
|
||||
* <term>-</term>
|
||||
* <listitem>
|
||||
* Do not pad a numeric result.
|
||||
* This overrides the default padding for the specifier.
|
||||
* </listitem>
|
||||
* </varlistentry>
|
||||
* <varlistentry>
|
||||
* <term>0</term>
|
||||
* <listitem>
|
||||
* Pad a numeric result with zeros.
|
||||
* This overrides the default padding for the specifier.
|
||||
* </listitem>
|
||||
* </varlistentry>
|
||||
* </variablelist>
|
||||
*
|
||||
* Returns: a newly allocated string formatted to the requested format
|
||||
* or %NULL in the case that there was an error. The string
|
||||
* should be freed with g_free().
|
||||
|
Loading…
Reference in New Issue
Block a user