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> <<a href="mailto:mathk.sue@gmail.com">mathk.sue@gmail.com</a>> 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> self<br> assert: date mmddyyyy = '6/2/1973';<br> assert: date yyyymmdd = '1973-06-02';<br> assert: (date printFormat: #(3 1 2 $! 2 1 1)) = '1973!2!Jun'.
<br><br>HTH<br><br>2006/12/12, Kel Graham <<a href="mailto:kel@orawia.com">kel@orawia.com</a>>:<br>> Hello,<br>><br>> I'd like to see how to control the formatting and storage of dates. I'm in<br>> the UK so would like to store my dates in yyyy-mm-dd format, but display
<br>> them as dd-mm-yyyy; or as '12 December 2006' sometimes as well. I've looked<br>> at the Date class, but apart from the printFormat: method (which I can't see<br>> an explanation of the format) I can't see any easy way of ensuring that
<br>> squeak converts my dd-mm-yyyy input into a nice ISO yyyy-mm-dd format.<br>><br>> Could anyone suggest some classes/code to look at?<br>><br>><br>> Thanks very much,<br>> Kel.<br>><br>><br>
><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>><br>><br>><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>