Fix `HGRevisonInfo >> #date` to return correct date
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 11 Oct 2018 09:32:34 +0200
changeset 863 c51c017f91a5
parent 862 458a462cc9ff
child 864 c854577212b8
Fix `HGRevisonInfo >> #date` to return correct date Oops, due to a wrong format specification, the returned string was completely bogus! This commit fixes this and makes sure the date can be then parsed to an instance of a `Date` using `Date class >> readFrom:`
mercurial/HGRevisionInfo.st
--- a/mercurial/HGRevisionInfo.st	Tue Sep 25 12:47:30 2018 +0100
+++ b/mercurial/HGRevisionInfo.st	Thu Oct 11 09:32:34 2018 +0200
@@ -179,10 +179,10 @@
     | cs |
 
     cs := self changeset.
-    cs notNil ifTrue:[ ^ cs timestamp printStringFormat:'%y/%m/%d' ].
+    cs notNil ifTrue:[ ^ cs timestamp printStringFormat: '%(year)-%(month)-%(day)' ].
     ^ nil
 
-    "Modified: / 02-11-2015 / 18:55:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-10-2018 / 09:44:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileName
@@ -224,10 +224,10 @@
     | cs |
 
     cs := self changeset.
-    cs notNil ifTrue:[ ^ cs timestamp printStringFormat:'%h:%m:%s' ].
+    cs notNil ifTrue:[ ^ cs timestamp printStringFormat: '%h:%m:%s' ].
     ^ nil
 
-    "Modified: / 02-11-2015 / 18:56:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-10-2018 / 09:37:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 timezone