class: Timestamp
changed: #readFrom:format:language:onError:
fix in Y format reading
--- a/Timestamp.st Sat Jun 06 13:18:11 2015 +0200
+++ b/Timestamp.st Sat Jun 06 13:42:28 2015 +0200
@@ -845,10 +845,10 @@
] ifFalse:[ ( format = 'Y' ) ifTrue:[
year := Integer readFrom:input onError:[ error value:'invalid year' ].
(year between:0 and: 99) ifFalse:[ error value:'invalid year' ].
- (year between:0 and:71) ifTrue:[
+ (year < 70) ifTrue:[
+ year := year + 2000
+ ] ifFalse:[
year := year + 1900
- ] ifFalse:[
- year := year + 2000
]
] ifFalse:[ (format = 'monthName') ifTrue:[
@@ -3971,11 +3971,11 @@
!Timestamp class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.217 2015-06-06 11:17:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.218 2015-06-06 11:42:28 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.217 2015-06-06 11:17:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.218 2015-06-06 11:42:28 cg Exp $'
! !