From 3f1dd62a0c87aa9b1a7243c1604bdbd5a29dd138 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 30 Oct 2020 20:40:49 +0100 Subject: [PATCH] Fix Bug#44289 * lisp/files.el (directory-listing-before-filename-regexp): Support DD-MMM-YYYY format. (Bug#44289) --- lisp/files.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index fdf758ad927..59bcc3e8a78 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6954,6 +6954,9 @@ If DIR's free space cannot be obtained, this function returns nil." s "+" "\\(" HH:MM "\\|" yyyy "\\)")) (western-comma (concat month s "+" dd "," s "+" yyyy)) + ;; This represents the date in strftime(3) format "%e-%b-%Y" + ;; (aka "%v"), as it is the default for many ls incarnations. + (DD-MMM-YYYY (concat dd "-" month "-" yyyy s HH:MM)) ;; Japanese MS-Windows ls-lisp has one-digit months, and ;; omits the Kanji characters after month and day-of-month. ;; On Mac OS X 10.3, the date format in East Asian locales is @@ -6981,7 +6984,8 @@ If DIR's free space cannot be obtained, this function returns nil." ;; This is not supported yet. (purecopy (concat "\\([0-9][BkKMGTPEZY]? " iso "\\|.*[0-9][BkKMGTPEZY]? " - "\\(" western "\\|" western-comma "\\|" east-asian "\\)" + "\\(" western "\\|" western-comma + "\\|" DD-MMM-YYYY "\\|" east-asian "\\)" "\\) +"))) "Regular expression to match up to the file name in a directory listing. The default value is designed to recognize dates and times -- 2.39.2