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