Timestamp.st
changeset 18449 48c31fe80359
parent 18447 e494a04e3283
child 18451 b5c5d8653dc8
equal deleted inserted replaced
18448:47f63bccdee0 18449:48c31fe80359
   843             year := Integer readFrom:input onError:[ error value:'invalid year' ].
   843             year := Integer readFrom:input onError:[ error value:'invalid year' ].
   844 
   844 
   845         ] ifFalse:[ ( format = 'Y' ) ifTrue:[
   845         ] ifFalse:[ ( format = 'Y' ) ifTrue:[
   846             year := Integer readFrom:input onError:[ error value:'invalid year' ].
   846             year := Integer readFrom:input onError:[ error value:'invalid year' ].
   847             (year between:0 and: 99) ifFalse:[ error value:'invalid year' ].
   847             (year between:0 and: 99) ifFalse:[ error value:'invalid year' ].
   848             (year between:0 and:71) ifTrue:[
   848             (year < 70) ifTrue:[
       
   849                 year := year + 2000
       
   850             ] ifFalse:[
   849                 year := year + 1900
   851                 year := year + 1900
   850             ] ifFalse:[
       
   851                 year := year + 2000
       
   852             ]
   852             ]
   853 
   853 
   854         ] ifFalse:[ (format = 'monthName') ifTrue:[
   854         ] ifFalse:[ (format = 'monthName') ifTrue:[
   855             s := input nextMatching:[:c | c isLetter] thenMatching:[:c | c isLetter].
   855             s := input nextMatching:[:c | c isLetter] thenMatching:[:c | c isLetter].
   856             month := Date indexOfMonth:s asLowercase language:languageOrNil
   856             month := Date indexOfMonth:s asLowercase language:languageOrNil
  3969 ! !
  3969 ! !
  3970 
  3970 
  3971 !Timestamp class methodsFor:'documentation'!
  3971 !Timestamp class methodsFor:'documentation'!
  3972 
  3972 
  3973 version
  3973 version
  3974     ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.217 2015-06-06 11:17:57 cg Exp $'
  3974     ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.218 2015-06-06 11:42:28 cg Exp $'
  3975 !
  3975 !
  3976 
  3976 
  3977 version_CVS
  3977 version_CVS
  3978     ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.217 2015-06-06 11:17:57 cg Exp $'
  3978     ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.218 2015-06-06 11:42:28 cg Exp $'
  3979 ! !
  3979 ! !
  3980 
  3980 
  3981 
  3981 
  3982 Timestamp initialize!
  3982 Timestamp initialize!