mirror of
https://github.com/correl/melpa.git
synced 2024-11-14 19:19:32 +00:00
If the last update to a package was at midnight, ensure the HHMM part of version is "0", not ""
See purcell/emacs.d#47
This commit is contained in:
parent
20fdd5e145
commit
9ddf14d643
1 changed files with 3 additions and 6 deletions
|
@ -72,12 +72,9 @@
|
|||
(message (format "%s\n" (substring-no-properties str)))
|
||||
;; We remove zero-padding the HH portion, as it is lost
|
||||
;; when stored in the archive-contents
|
||||
(replace-regexp-in-string "\\.0+"
|
||||
"."
|
||||
(format-time-string
|
||||
"%Y%m%d.%H%M"
|
||||
(date-to-time
|
||||
(substring-no-properties str)))))
|
||||
(let ((time (date-to-time (substring-no-properties str))))
|
||||
(concat (format-time-string "%Y%m%d." time)
|
||||
(format "%d" (or (parse-integer (format-time-string "%H%M" time)) 0)))))
|
||||
|
||||
(defun pb/string-match-all (regex str &optional group)
|
||||
"Find every match for `REGEX' within `STR', returning the full match string or group `GROUP'."
|
||||
|
|
Loading…
Reference in a new issue