mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-16 01:06:15 +01:00
Merge branch '2520-date-docs' into 'main'
gdate: Clarify the documentation for g_date_new_dmy() and new_julian() Closes #2520 See merge request GNOME/glib!2318
This commit is contained in:
commit
9500542d78
22
glib/gdate.c
22
glib/gdate.c
@ -288,11 +288,14 @@ g_date_new (void)
|
||||
* @month: month of the year
|
||||
* @year: year
|
||||
*
|
||||
* Like g_date_new(), but also sets the value of the date. Assuming the
|
||||
* day-month-year triplet you pass in represents an existing day, the
|
||||
* returned date will be valid.
|
||||
* Create a new #GDate representing the given day-month-year triplet.
|
||||
*
|
||||
* Returns: a newly-allocated #GDate initialized with @day, @month, and @year
|
||||
* The triplet you pass in must represent a valid date. Use g_date_valid_dmy()
|
||||
* if needed to validate it. The returned #GDate is guaranteed to be non-%NULL
|
||||
* and valid.
|
||||
*
|
||||
* Returns: (transfer full) (not nullable): a newly-allocated #GDate
|
||||
* initialized with @day, @month, and @year
|
||||
*/
|
||||
GDate*
|
||||
g_date_new_dmy (GDateDay day,
|
||||
@ -320,11 +323,14 @@ g_date_new_dmy (GDateDay day,
|
||||
* g_date_new_julian:
|
||||
* @julian_day: days since January 1, Year 1
|
||||
*
|
||||
* Like g_date_new(), but also sets the value of the date. Assuming the
|
||||
* Julian day number you pass in is valid (greater than 0, less than an
|
||||
* unreasonably large number), the returned date will be valid.
|
||||
* Create a new #GDate representing the given Julian date.
|
||||
*
|
||||
* Returns: a newly-allocated #GDate initialized with @julian_day
|
||||
* The @julian_day you pass in must be valid. Use g_date_valid_julian() if
|
||||
* needed to validate it. The returned #GDate is guaranteed to be non-%NULL and
|
||||
* valid.
|
||||
*
|
||||
* Returns: (transfer full) (not nullable): a newly-allocated #GDate initialized
|
||||
* with @julian_day
|
||||
*/
|
||||
GDate*
|
||||
g_date_new_julian (guint32 julian_day)
|
||||
|
Loading…
Reference in New Issue
Block a user