Function

GLibDateget_monday_weeks_in_year

Declaration

guint8
g_date_get_monday_weeks_in_year (
  GDateYear year
)

Description

Returns the number of weeks in the year, where weeks are taken to start on Monday. Will be 52 or 53. The date must be valid. (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it’s a leap year. This function is basically telling you how many Mondays are in the year, i.e. there are 53 Mondays if one of the extra days happens to be a Monday.)

Parameters

year

Type: GDateYear

A year.

Return value

Type: guint8

Number of Mondays in the year.