[GOODIE] Date format arrays translation

Leandro Caniglia caniglia at dm.uba.ar
Wed Jan 2 15:45:26 UTC 2002


>From preamble:

Change Set:		DateFormat
Date:			1 January 2002
Author:			Leandro Caniglia

If you cannot recall the format array used in Date printing
methods, this goodie is for you.

Print dates using messages as in:

	Date today printWithPicture: 'dd-mmm-yyyy'
	Date today printWithPicture: 'yy/m/d'
	Date today printWithPicture: 'month d yyyy'

and so on.

Want to know the meaning of

	printFormat: #(3 1 2 $. 2 1 2) ?

use:
	DateFormat fromArray: #(3 1 2 $. 2 1 2)

and get

	 'yyyy.dd.mmm'

/Leandro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DateFormat.5.cs.gz
Type: application/x-gzip
Size: 1716 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020102/7adefce1/DateFormat.5.cs.bin


More information about the Squeak-dev mailing list