Dates should always be sorted numerically

This commit is contained in:
Andy Miller
2018-01-04 11:45:31 -07:00
parent 0feeb743ff
commit 72abab6450
2 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
# v1.4.0-rc.1
## mm/dd/2017
1. [](#bugfix)
* Date ordering should always be numeric [#1810](https://github.com/getgrav/grav/issues/1810)
# v1.4.0-beta.3
## 12/29/2017

View File

@@ -1203,19 +1203,19 @@ class Pages
break;
case 'date':
$list[$key] = $child->date();
$sort_flags = SORT_REGULAR;
$sort_flags = SORT_NUMERIC;
break;
case 'modified':
$list[$key] = $child->modified();
$sort_flags = SORT_REGULAR;
$sort_flags = SORT_NUMERIC;
break;
case 'publish_date':
$list[$key] = $child->publishDate();
$sort_flags = SORT_REGULAR;
$sort_flags = SORT_NUMERIC;
break;
case 'unpublish_date':
$list[$key] = $child->unpublishDate();
$sort_flags = SORT_REGULAR;
$sort_flags = SORT_NUMERIC;
break;
case 'slug':
$list[$key] = $child->slug();