Method

GLibDateTimeadd_weeks

Declaration

GDateTime*
g_date_time_add_weeks (
  GDateTime* datetime,
  gint weeks
)

Description

Creates a copy of datetime and adds the specified number of weeks to the copy. Add negative values to subtract weeks.

Available since:2.26

Parameters

weeks gint
 

The number of weeks.

Return value

Returns: GDateTime
 

The newly created GDateTime which should be freed with g_date_time_unref(), or NULL.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.