--- title: GroupByDate description: Returns the given page collection grouped by date in descending order. categories: [] keywords: [] params: functions_and_methods: returnType: page.PagesGroup signatures: ['PAGES.GroupByDate LAYOUT [SORT]'] --- ## Usage When grouping by date, the value is determined by your [project configuration][], defaulting to the `date` field in front matter. The [layout string](#layout-string) has the same format as the layout string for the [`time.Format`][] function. The resulting group key is [localized](g) for language and region. {{% include "/_common/methods/pages/group-sort-order.md" %}} To group content by year and month: ```go-html-template {{ range .Pages.GroupByDate "January 2006" }}
{{ .Key }}
{{ .Key }}
{{ .Key }}