[squeak-dev] Could we have 1 api that work across all of the datish classes?

Chris Muller asqueaker at gmail.com
Fri Sep 12 15:16:54 UTC 2014


Just use the binary operators.

myDate + 3 days.
myDate - 3 days.
myDateAndTime + 3 days.
myDateAndTime - 3 days.
3 days fromNow.
3 days ago.

Finally, TimeStamps are deprecated, don't use them.

On Fri, Sep 12, 2014 at 9:59 AM, Chris Cunningham
<cunningham.cb at gmail.com> wrote:
> at least adjusting the date portions?  We currently have:
>
> Date - #addDays:, #subtractDays:
> TimeStamp - #plusDays:, #minusDays:
> DateAndTime - #+ and #-
>
>  I keep getting messed up by which type of object I have, and which method
> it understands to alter the date portion.
>
> Would the community be interested in having these methods spread out to all
> of the types so that we can have more polymorphic date representations?
> (and, maybe, even the rest of the protocols?)
>
> Or, alternatively, removing some of the options and settling on one
> standard?
>
> -cbc
>
>
>


More information about the Squeak-dev mailing list