[GemStone-Smalltalk] DateAndTime users' questionnaire

Paul DeBruicker pdebruic at gmail.com
Thu Jun 25 12:56:45 PDT 2020


Gemstone/S mailing list wrote
> If you use DateAndTime in your GemStone application, we at GemTalk would 
> very much appreciate your feedback on the questions below.
> 
> At customer request, we're working on a SmallDateAndTime class for 
> GemStone -- a "Special" (immediate) version of DateAndTime that relates 
> to DateAndTime similarly to the relationship between SmallInteger and 
> LargeInteger. For customers with many persistent DateAndTime instances, 
> this should improve both space and time performance.
> 
> There are design tradeoffs in resolution, range, printing, etc., and it 
> will help us make better decisions if we know how DateAndTime is being 
> used now.
> 
> (1) Which of the following messages do you use to create DateAndTime 
> instances?
>   * DateAndTime now
>   * DateAndTime nowWithScale:
>   * DateAndTime fromString:
>   * DateAndTime year:day:hour* or year:month:day:hour*
>   * Other protocol

I use the DateTime class as it seemed faster for instantiation and
comparison. But in that class of the methods you mention I use 
#now
#year:month:day:hour*
#fromString:

Other instantiation methods I;ve added are 
date:in:
epoch
fromDate:
fromDateAndTime:
fromDateTime:butIn:
fromHourString:
fromHourString:on:
fromJSTime:
fromSeconds:
fromString:madeInTimeZone:
fromUnixTime:
tomorrow
unixEpoch
year:day:hour:minute:second:offset:
year:day:hour:minute:second:timeZone:
year:month:day:
year:month:day:hour:minute:second:
year:month:day:hour:minute:second:offset:
year:month:day:hour:minute:second:timeZone:
yesterday




> (2) Do you need DateAndTimes with resolution finer than a microsecond?

No


> 
> (3) What is your year range of DateAndTime; do you need or use 
> DateAndTimes more than 5/10/50 years into the future (or the past)?

January 2004 to now plus some years into the future. 


> (4) How do you handle DateAndTime printing?

I made a bunch of #print... convenience methods.
e.g
printShortDate
printShortTime
printHM
printMDY
.....


> (5) Have you created a subclass of DateAndTime or DateAndTimeANSI, or 
> added your own methods to DateAndTime or DateAndTimeANSI?  If this is 
> general functionality that could be useful to include in the base, 
> please let us know.

150 extension methods on DateTime & about 100 on DateAndTime. 
I've no idea which of them I use most but I think a lot of them. 

Mostly printing and comparison/conversion convenience methods.


> (6) DateAndTime instances would need to be immutable, to be 
> interoperable with SmallDateAndTime. If you are using methods that do 
> update a DateAndTime, such as offset: or beRounded, does your code 
> expect the receiver to be modified?

I always make new ones. 


> _______________________________________________
> GemStone-Smalltalk mailing list

> GemStone-Smalltalk at .gemtalksystems

> https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk





--
Sent from: http://forum.world.st/Gemstone-S-f1461796.html


More information about the GemStone-Smalltalk mailing list