| Deutsch English Français Italiano |
|
<66ea2693$0$709$14726298@news.sunsite.dk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Tue, 17 Sep 2024 21:02:12 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: VMS Software Bootcamp 2024 Newsgroups: comp.os.vms References: <7c6e9a918559f88f5bce8b69e461dcfdec96ba30@i2pn2.org> <66e465e9$0$705$14726298@news.sunsite.dk> <vc1uc1$vrpj$1@dont-email.me> <vc1v5l$svaa$1@dont-email.me> <vc21ar$pk50$1@dont-email.me> <vc97va$2r783$1@dont-email.me> <vccm3q$3lvi8$1@dont-email.me> <vcd21c$3nnaq$1@dont-email.me> <vcd354$3o6ae$1@dont-email.me> <vcd40m$3nnaq$2@dont-email.me> <vcd7bt$3op6a$1@dont-email.me> Content-Language: en-US From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> In-Reply-To: <vcd7bt$3op6a$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 39 Message-ID: <66ea2693$0$709$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 258edc41.news.sunsite.dk X-Trace: 1726621331 news.sunsite.dk 709 arne@vajhoej.dk/68.14.27.188:59162 X-Complaints-To: staff@sunsite.dk Bytes: 2199 On 9/17/2024 8:37 PM, Lawrence D'Oliveiro wrote: > On Tue, 17 Sep 2024 19:40:07 -0400, Arne Vajhøj wrote: >> On 9/17/2024 7:25 PM, Lawrence D'Oliveiro wrote: >>> I would say Java in particular is an example of how not to do it. >> >> You mean that "HH:mm" and "hh:mm a" are way worse than '%H:%M' and >> '%I:%M %p' ? >> >> :-) > > I mean, look at the mess of classes that makes up the Java date/time API. That is a bit peripheral to the time formatting issue. The java.time package added in Java 8 is indeed rather big and can be hard to navigate. The old stuff is pretty straightforward. All one need to know is: Date = point in time = C time_t Calendar/GregorianCalendar = conversion between point in time and time components = C gmtime/localtime/mktime DateFormat/SimpleDateFormat = conversion between binary and text representation = C strftime/strptime (the java.time equivalents are Instant, LocalDateTime and DateTimeFormatter) Arne