Ah - thank you! <br><br>It took me a while to realise what the second half of the printFormat: statement was saying, but got there in the end.<br><br>Also, thanks for pointing out the tests in Kernel-Chronology-Tests.. I kept looking at the Date class, never realising that there were lots of tests in the next category! A quick use of Method Finder helped me find them..
<br><br>Cheers,<br>Kel.<br><br><div><span class="gmail_quote">On 12/12/06, <b class="gmail_sendername">Mathieu SUEN</b> &lt;<a href="mailto:mathk.sue@gmail.com">mathk.sue@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Have a look at #yyyymmdd<br><br>And the test:<br><br>testPrinting<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert: date mmddyyyy = '6/2/1973';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert: date yyyymmdd = '1973-06-02';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert: (date printFormat: #(3 1 2 $! 2 1 1)) = '1973!2!Jun'.
<br><br>HTH<br><br>2006/12/12, Kel Graham &lt;<a href="mailto:kel@orawia.com">kel@orawia.com</a>&gt;:<br>&gt; Hello,<br>&gt;<br>&gt; I'd like to see how to control the formatting and storage of dates. I'm in<br>&gt; the UK so would like to store my dates in yyyy-mm-dd format, but display
<br>&gt; them as dd-mm-yyyy; or as '12 December 2006' sometimes as well. I've looked<br>&gt; at the Date class, but apart from the printFormat: method (which I can't see<br>&gt; an explanation of the format) I can't see any easy way of ensuring that
<br>&gt; squeak converts my dd-mm-yyyy input into a nice ISO yyyy-mm-dd format.<br>&gt;<br>&gt; Could anyone suggest some classes/code to look at?<br>&gt;<br>&gt;<br>&gt; Thanks very much,<br>&gt; Kel.<br>&gt;<br>&gt;<br>
&gt;<br>&gt; _______________________________________________<br>&gt; Beginners mailing list<br>&gt; <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">
http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>&gt;<br>&gt;<br>&gt;<br>_______________________________________________<br>Beginners mailing list<br><a href="mailto:Beginners@lists.squeakfoundation.org">
Beginners@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br></blockquote></div><br><br clear="all">
<br>-- <br>Kel Graham<br><a href="http://www.savvant.com">www.savvant.com</a><br><a href="mailto:kel.graham@gmail.com">kel.graham@gmail.com</a>