From 0222feb41c5dd5fb44219ee322acafcfdba61120 Mon Sep 17 00:00:00 2001 From: Alex Kleissner Date: Tue, 12 May 2015 15:42:02 -0700 Subject: [PATCH] Allow setting a post date using a single digit day. closes #5248 - added new valid formats for the date formatter - only the date formats where a single digit day makes sense were changed --- ghost/admin/app/utils/date-formatting.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghost/admin/app/utils/date-formatting.js b/ghost/admin/app/utils/date-formatting.js index f81554c2fe..4c4338e56b 100644 --- a/ghost/admin/app/utils/date-formatting.js +++ b/ghost/admin/app/utils/date-formatting.js @@ -8,13 +8,16 @@ var parseDateFormats, formatDate; parseDateFormats = ['DD MMM YY @ HH:mm', 'DD MMM YY HH:mm', + 'D MMM YY @ HH:mm', 'D MMM YY HH:mm', 'DD MMM YYYY @ HH:mm', 'DD MMM YYYY HH:mm', + 'D MMM YYYY @ HH:mm', 'D MMM YYYY HH:mm', 'DD/MM/YY @ HH:mm', 'DD/MM/YY HH:mm', 'DD/MM/YYYY @ HH:mm', 'DD/MM/YYYY HH:mm', 'DD-MM-YY @ HH:mm', 'DD-MM-YY HH:mm', 'DD-MM-YYYY @ HH:mm', 'DD-MM-YYYY HH:mm', 'YYYY-MM-DD @ HH:mm', 'YYYY-MM-DD HH:mm', - 'DD MMM @ HH:mm', 'DD MMM HH:mm']; + 'DD MMM @ HH:mm', 'DD MMM HH:mm', + 'D MMM @ HH:mm', 'D MMM HH:mm']; displayDateFormat = 'DD MMM YY @ HH:mm';