[Glass] Date reading and writing
Johan Brichau
johan at yesplan.be
Fri May 31 02:21:33 PDT 2019
Did you check out `printFormat:` ?
Probably not as extensive as what you can find in full i18n libraries but it does the job for us.
Overall, I think it’s better practice to never rely on `asString` to print anything to the user.
Cheers,
Johan
> On 31 May 2019, at 10:40, Marten Feldtmann via Glass <glass at lists.gemtalksystems.com> wrote:
>
> Yes, always a mess ... we wrote our own code ...
>
> And as always ... Gemstone/S is based on ICU libraries, they have all stuff available to use these low-level mainstream libraries but they hide it everywhere ... it would be really nice, if they have a way of accessing their with the product delivered libraries.
>
> As with TimeStamps - I decided to go with RFC3339 format - so our libraries in C#, Java, Python and Javascript are able to read these data.
>
>
>
> Marten
>
>> Jupiter Jones via Glass <glass at lists.gemtalksystems.com <mailto:glass at lists.gemtalksystems.com>> hat am 30. Mai 2019 um 02:38 geschrieben:
>>
>>
>> Hi All,
>>
>> I use a bunch of frameworks like Magritte, NeoCSV, NeoJSON and others that all write dates based on aDate-#asString (which formats dates in USA date format) and read based on Date-#readFrom: (which reads expecting USA date format).
>>
>> Since the USA is the only country that uses this format, how is everyone else dealing with it?
>>
>> Overriding date printing and reading in each framework seems counter-productive and fraught with error, as does replacing #asString and #readFrom: in Date itself.
>>
>> There doesn’t appear to be Date related stuff in Locale, so I’m guessing I’m missing something simple here :)
>>
>> Any advice would be much appreciated.
>>
>> Cheers,
>>
>> Jupiter
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
>> https://lists.gemtalksystems.com/mailman/listinfo/glass <https://lists.gemtalksystems.com/mailman/listinfo/glass>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20190531/31eb062f/attachment-0001.html>
More information about the Glass
mailing list