« Return to Thread: Easiest way to present Dates

Easiest way to present Dates

by Keithy :: Rate this Message:

Reply to Author | View in Thread

I have been looking for the easiest way to get a date to display with
the desired format.

By adding

BlockContext-write: anObject description: aDescription

    ^ self value: anObject

The following becomes possible:

    ^ MADateDescription new
        selectorAccessor: #orderDate;
        beWithinYears: 2;
        stringWriter: [ :i | i mmddyyyy ];
        label: 'Order Date';
        beReadonly;
        beSearchable;
        yourself
       
Is there a better way?
Is this worth adding to the mainstream?

Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

 « Return to Thread: Easiest way to present Dates

LightInTheBox - Buy quality products at wholesale price