Change date format from YYYY-MM-DD to DD-MM-YYYY
This commit is contained in:
parent
3e5dea2aaf
commit
2a74bc57af
2 changed files with 7 additions and 5 deletions
|
@ -483,10 +483,12 @@
|
|||
(minute (elt time 1))
|
||||
(second (elt time 2)))
|
||||
(cond
|
||||
((eq timestamp nil)
|
||||
nil)
|
||||
((eq format :date)
|
||||
(format "%s-%s-%s" day month year hour minute second))
|
||||
(format "%s-%s-%s" year month day hour minute second))
|
||||
((eq format :datetime)
|
||||
(format "%s-%s-%s %s:%s:%s" day month year hour minute second)))))
|
||||
(format "%s-%s-%s %s:%s:%s" year month day hour minute second)))))
|
||||
|
||||
|
||||
(provide 'taskwarrior)
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
(should (string= (taskwarrior--parse-created-task-id "Some invalid input") nil)))
|
||||
|
||||
(ert-deftest taskwarrior--parse-date ()
|
||||
(should (string= (taskwarrior--parse-date "20191108T225959Z") "08-11-2019"))
|
||||
(should (string= (taskwarrior--parse-date "20191108T225959Z" :date) "08-11-2019"))
|
||||
(should (string= (taskwarrior--parse-date "20191108T225959Z" :datetime) "08-11-2019 22:59:59")))
|
||||
(should (string= (taskwarrior--parse-date "20191108T225959Z") "2019-11-08"))
|
||||
(should (string= (taskwarrior--parse-date "20191108T225959Z" :date) "2019-11-08"))
|
||||
(should (string= (taskwarrior--parse-date "20191108T225959Z" :datetime) "2019-11-08 22:59:59")))
|
||||
|
||||
|
||||
(provide 'taskwarrior-test)
|
||||
|
|
Loading…
Reference in a new issue