Number.st
changeset 23619 90c9530305b7
parent 23615 3faa6422e9b7
child 24157 c75b75fd3aaf
--- a/Number.st	Mon Jan 21 10:30:55 2019 +0100
+++ b/Number.st	Mon Jan 21 10:31:25 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -247,7 +249,7 @@
      it allows for prefixed + and also allows missing fractional part after eE.
      It supports 0x, 0o and 0b prefixes (hex, octal and binary)
      and the regular Smalltalk radix prefix xr.
-     If also allows for strings like '1.0×1015' to be read (as 1E+15).
+     If also allows for strings like '1.0×1015' to be read (as 1E+15).
 
      It also allows garbage after the number - i.e. it reads what it can.
      See #fromString: , which is more strict and does not allow garbage at the end.
@@ -436,7 +438,7 @@
                                     scale:(scale ? mantissaAndScale third).
                     ].
                 ] ifFalse:[
-                    (nextChar == $×) ifTrue:[
+                    (nextChar == $×) ifTrue:[
                         (((nextChar := str nextPeek) == $1)
                           and:[ ((nextChar := str nextPeek) == $0) ]
                         ) ifTrue:[
@@ -1372,8 +1374,8 @@
 !
 
 asTimeDuration
-    "return an TimeDuration object from the receiver, taking the receiver
-     as number of seconds"
+    "return an TimeDuration object from the receiver, 
+     taking the receiver as number of seconds"
 
     ^ TimeDuration seconds:self
 
@@ -1381,9 +1383,11 @@
      5 asTimeDuration
      50.25 asTimeDuration
      3600 asTimeDuration
+     '5m' asTimeDuration
     "
 
     "Created: / 08-01-2012 / 19:04:04 / cg"
+    "Modified (comment): / 21-01-2019 / 10:31:15 / Claus Gittinger"
 !
 
 degreesToRadians