[GemStone-Smalltalk] migrating to SmallDate and SmallDateAndTime
Richard Sargent
richard.sargent at gemtalksystems.com
Thu Sep 1 09:51:20 PDT 2022
Sorry, Otto. #copy will NOT do it. I misread my results.
I suggest you create an e.g. #normalized method on the various original
classes and on their Small* subclasses and on Object. Object and the Small*
classes would answer self. The implementation on DateAndTime, etc.would use
the instance creation API to create a new instance (which would turn out to
be the special OOP encoded object). Replace the instance if #normalized
gives you a different object, leave it alone if it answers the original
object.
On Thu, Sep 1, 2022 at 9:32 AM Otto Behrens <otto at finworks.biz> wrote:
> Ha! Thanks a lot Richard
>
> On Thu, 01 Sep 2022, 18:23 Richard Sargent, <
> richard.sargent at gemtalksystems.com> wrote:
>
>> On Thu, Sep 1, 2022 at 5:18 AM Otto Behrens via GemStone-Smalltalk <
>> gemstone-smalltalk at lists.gemtalksystems.com> wrote:
>>
>>> Hi,
>>>
>>> We are upgrading to GS 3.6.x and would like to convert our Date objects
>>> to SmallDate and DateAndTime objects to SmallDateAndTime. What would be an
>>> efficient way to do this? I reckon I will have to hunt for the most
>>> commonly used places where they are used and then just convert.
>>>
>>
>> Repository>>allReferencesToInstancesOfClasses: can be used to find the
>> referencing objects.
>>
>>
>>> What would be the best methods to use to create a new SmallDate from a
>>> Date and a SmallDateAndTime from a DateAndTime?
>>>
>>
>> Sending #copy to the old DateAndTime should answer a SmallDateAndTime.
>>
>>
>>> Thanks
>>>
>>> Otto Behrens
>>>
>>> +27 82 809 2375
>>> [image: FINWorks]
>>> [image: FINWorks] <http://za.linkedin.com/in/waltherbehrens>
>>> www.finworks.biz
>>>
>>> Disclaimer & Confidentiality Note: This email is intended solely for the
>>> use of the individual or entity named above as it may contain information
>>> that is confidential and privileged. If you are not the intended recipient,
>>> be advised that any dissemination, distribution or copying of this email is
>>> strictly prohibited. FINWorks cannot be held liable by any person other
>>> than the addressee in respect of any opinions, conclusions, advice or other
>>> information contained in this email.
>>> _______________________________________________
>>> GemStone-Smalltalk mailing list
>>> GemStone-Smalltalk at lists.gemtalksystems.com
>>> https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/gemstone-smalltalk/attachments/20220901/13637fc7/attachment-0001.htm>
More information about the GemStone-Smalltalk
mailing list