Time.st
changeset 23021 84cc05d2dde8
parent 22886 a303a0c8a8c9
child 23237 46fd19ee3446
equal deleted inserted replaced
23020:5c413c4c1188 23021:84cc05d2dde8
   544     "return the format string used to format non US times"
   544     "return the format string used to format non US times"
   545 
   545 
   546     ^ '%h:%m:%s.%i'
   546     ^ '%h:%m:%s.%i'
   547 ! !
   547 ! !
   548 
   548 
       
   549 
       
   550 
   549 !Time methodsFor:'Compatibility-Backward'!
   551 !Time methodsFor:'Compatibility-Backward'!
   550 
   552 
   551 asMilliSeconds
   553 asMilliSeconds
   552     <resource: #obsolete>
   554     <resource: #obsolete>
   553     "return the number of milliseconds elapsed since midnight"
   555     "return the number of milliseconds elapsed since midnight"
   924      Time now printIso8601FormatOn:Transcript. Transcript cr. 
   926      Time now printIso8601FormatOn:Transcript. Transcript cr. 
   925 
   927 
   926     "
   928     "
   927 !
   929 !
   928 
   930 
       
   931 printIso8601CompressedOn:aStream
       
   932     "prints the receiver as local time"
       
   933 
       
   934     Timestamp timestampISO8601Builder
       
   935         print:self compact:true
       
   936         asLocal:true asUTC:false withMilliseconds:true
       
   937         timeSeparator:$T timeOnly:true
       
   938         on:aStream
       
   939 
       
   940     "
       
   941      Time now printString           -> '04:23:33 PM'
       
   942      Time now printStringIso8601    -> 'T16:23:39'  (notice: this is local time)
       
   943 
       
   944      Time now printAsUTCIso8601FormatOn:Transcript. Transcript cr.
       
   945      Time now printIso8601FormatOn:Transcript. Transcript cr. 
       
   946     "
       
   947 
       
   948     "Created: / 25-05-2018 / 12:06:35 / Claus Gittinger"
       
   949 !
       
   950 
   929 printIso8601FormatOn:aStream
   951 printIso8601FormatOn:aStream
   930     "prints the receiver as local time"
   952     "prints the receiver as local time"
   931 
   953 
   932     Timestamp timestampISO8601Builder
   954     Timestamp timestampISO8601Builder
   933         print:self compact:false
   955         print:self compact:false
  1141      and should not be used outside."
  1163      and should not be used outside."
  1142 
  1164 
  1143     timeEncoding := encoding
  1165     timeEncoding := encoding
  1144 ! !
  1166 ! !
  1145 
  1167 
       
  1168 
  1146 !Time methodsFor:'visiting'!
  1169 !Time methodsFor:'visiting'!
  1147 
  1170 
  1148 acceptVisitor:aVisitor with:aParameter
  1171 acceptVisitor:aVisitor with:aParameter
  1149     "dispatch for visitor pattern; send #visitTime:with: to aVisitor"
  1172     "dispatch for visitor pattern; send #visitTime:with: to aVisitor"
  1150 
  1173