Hi guys!
Ok, I stumbled onto Petr's question about parsing Dates using simple patterns and couldn't help hacking something up. Attached.
regards, Göran
Hi!
Eh... and of course the pattern "ymd" doesn't work for obvious reasons - using "y", "m" and "d" requires some non-digit separators. Feel free to improve and add more tests etc! I kinda whipped it up - have to go to a conference soon.
And I presume of course that this stuff exists in Chronos, Chalten or hey, perhaps even somewhere in base Squeak that I missed. ;)
regards, Göran
Hi, nice example with streams! This is shorter and better than my own solution (http:// ss.praguesoft.cz/community/Date-Parsing-pf.5.mcz)
Thanks, pf
On 19.4.2007, at 15:36, Göran Krampe wrote:
Hi guys!
Ok, I stumbled onto Petr's question about parsing Dates using simple patterns and couldn't help hacking something up. Attached.
regards, Göran <DateReadFromPattern.2.cs.gz>
beginners@lists.squeakfoundation.org