Re: [lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Gary Gregory
If an API is deprecated, please make sure the @deprecated comment states clearly with an @link what the replacement is. This will allow people who use OpenRewrite to configure their wares accordingly. IOW, don't give users a headache ;-) Gary On Tue, Feb 11, 2025 at 7:18 AM Gilles Sadowski wrot

Re: [lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Gilles Sadowski
Hi. Le mar. 11 févr. 2025 à 12:56, Elliotte Rusty Harold a écrit : > > I am not surprised you've found issues with FastDateFormat. I'd be > more surprised if you didn't. Handling time zones is *hard* and almost > everyone gets it wrong, at least at first. In 2025 I wouldn't use > either SimpleDat

Re: [lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Elliotte Rusty Harold
I am not surprised you've found issues with FastDateFormat. I'd be more surprised if you didn't. Handling time zones is *hard* and almost everyone gets it wrong, at least at first. In 2025 I wouldn't use either SimpleDateFormat or FastDateFormat. Use java.time and java.time.formatter instead. These

[lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Matthew Bellew
I started using FastDateFormat.parser() while expanding some internal tests of an old custom date parser, and killing usages of SimpleDateFormat.parse(). Since FastDateFormat uses Calendar internally to keep state, I was surprised that I got unexpected results when using "generic" timezones. Gene