Re: GROOVY-12147 and default locales
MG <mgbiz-yvYIh6MZAuFWk0Htik3J/[email protected]> Sun, 12 Jul 2026 03:54:21 +0200
| Newsgroups | gmane.comp.lang.groovy.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------UFbd8O0gagvjKfvUhg8rKTGR
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
@Convenience variant:
1. Suggestion for date/date-time/timestamp formats:
1. yyyy-MM-dd
2. yyyy-MM-dd HH:mm:ss
3. yyyy-MM-dd HH:mm:ss.SSS
1. e.g.: 2026-12-31 23:59:59.999
4. Rationale: Easy to read, logical order (no year-day-month), no
am/pm, no named month ("July") etc
2. Consider having UTC variants:
1. Rationale: Works everywhere, avoids all summer-/winter time
problems, makes timestamps universally comparable, so can be
very convenient/helpful in certain situations, e.g. when peopl
from different continents have to read the same log file.
Cheers,
mg
Am 11.07.2026 um 07:16 schrieb Jochen Theodorou:
> Hi,
>
> the pull request for this was already closed so I had no chance to
> comment on it itself.
>
> I think there is a discussion about default locales I would like to
> start.
>
> My personal reality is that the default locale is useless. In fact it
> is actually a pain to work around it and very often I have to use
> multiple formats even for the same language. Not even the tests for
> GROOVY-12147, which also adds methods based on default locals, test
> based on the default locale. And I think they should.
>
> I would like to start a potentially controversial discussion:
>
> Do not support methods depending on the default Locale in GDM.
>
> If we want to have a convenience variant without formatter or locale,
> then let's define one format. I would especially remove that currency
> variant introduced in that PR.
>
> What do you guys think? I am especially interested in the opinion of
> people that do not program for just one country/region. I for example
> have very often programs in swiss/german/italian/french/english at the
> same time. At least if it is more than just a small command line
> script. Already when writing log files I may need a different format
> than what my locale says.
>
> bye Jochen
--------------UFbd8O0gagvjKfvUhg8rKTGR
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
@Convenience variant:<br>
<ol>
<li>Suggestion for date/date-time/timestamp formats:</li>
<ol>
<li>yyyy-MM-dd</li>
<li>yyyy-MM-dd HH:mm:ss</li>
<li>yyyy-MM-dd HH:mm:ss.SSS</li>
<ol>
<li>e.g.: 2026-12-31 23:59:59.999</li>
</ol>
<li>Rationale: Easy to read, logical order (no year-day-month),
no am/pm, no named month ("July") etc</li>
</ol>
<li>Consider having UTC variants: </li>
<ol>
<li>Rationale: Works everywhere, avoids all summer-/winter time
problems, makes timestamps universally comparable, so can be
very convenient/helpful in certain situations, e.g. when peopl
from different continents have to read the same log file.</li>
</ol>
</ol>
Cheers,<br>
mg<br>
<br>
<br>
<div class="moz-cite-prefix">Am 11.07.2026 um 07:16 schrieb Jochen
Theodorou:<br>
</div>
<blockquote type="cite"
cite="mid:275cf48a-4d16-4127-8ff7-146c77f7cc14-BA+cFGlbTmA@public.gmane.org">Hi,
<br>
<br>
the pull request for this was already closed so I had no chance to
comment on it itself.
<br>
<br>
I think there is a discussion about default locales I would like
to start.
<br>
<br>
My personal reality is that the default locale is useless. In fact
it is actually a pain to work around it and very often I have to
use multiple formats even for the same language. Not even the
tests for GROOVY-12147, which also adds methods based on default
locals, test based on the default locale. And I think they should.
<br>
<br>
I would like to start a potentially controversial discussion:
<br>
<br>
Do not support methods depending on the default Locale in GDM.
<br>
<br>
If we want to have a convenience variant without formatter or
locale, then let's define one format. I would especially remove
that currency variant introduced in that PR.
<br>
<br>
What do you guys think? I am especially interested in the opinion
of people that do not program for just one country/region. I for
example have very often programs in
swiss/german/italian/french/english at the same time. At least if
it is more than just a small command line script. Already when
writing log files I may need a different format than what my
locale says.
<br>
<br>
bye Jochen
<br>
</blockquote>
<br>
</body>
</html>
--------------UFbd8O0gagvjKfvUhg8rKTGR--