View previous topic :: View next topic |
Author |
Message |
pepoluan n00b
Joined: 28 Feb 2011 Posts: 43 Location: Jakarta, Indonesia
|
Posted: Thu Nov 07, 2024 10:12 am Post subject: How to submit patches for elogv? |
|
|
I want to submit a patch for elogv that will add the option of specifying a different date format (currently it seems hard-coded to be "MM/DD/YY", and as a sane person I'd like it to be "YYYY-MM-DD" instead).
However, the elogv repo on GitHub ( https://github.com/gentoo/elogv ) seems to be just a mirror.
So, how do I submit a proposed patch to elogv? _________________ Nobody is Perfect.
I am Nobody. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9607 Location: beyond the rim
|
Posted: Thu Nov 07, 2024 10:45 am Post subject: Re: How to submit patches for elogv? |
|
|
pepoluan wrote: | I want to submit a patch for elogv that will add the option of specifying a different date format (currently it seems hard-coded to be "MM/DD/YY", and as a sane person I'd like it to be "YYYY-MM-DD" instead).
However, the elogv repo on GitHub ( https://github.com/gentoo/elogv ) seems to be just a mirror.
So, how do I submit a proposed patch to elogv? |
In doubt submit the patch to bugs.gentoo.org. |
|
Back to top |
|
|
nicop Tux's lil' helper
Joined: 10 Apr 2014 Posts: 87
|
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1908
|
Posted: Thu Nov 07, 2024 1:49 pm Post subject: |
|
|
pepoluan wrote: | I want to submit a patch for elogv that will add the option of specifying a different date format (currently it seems hard-coded to be "MM/DD/YY", and as a sane person I'd like it to be "YYYY-MM-DD" instead). |
It is actually using Python's %x modifier for locale specific date formatting with strftime. https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
This would have to be changed to isoformat (or another formatting string) to get the desired result.
Alternatively, there's a cheap workaround for ISO 8601 (YYYY-MM-DD) if you add en_DK.UTF-8 to /etc/locale.gen then run locale-gen:
Code: | LC_TIME=en_DK.UTF-8 elogv | This trick only works with %x strftime calls as other month names may not be what is expected.
Last edited by grknight on Thu Nov 07, 2024 3:08 pm; edited 1 time in total |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2397
|
Posted: Thu Nov 07, 2024 2:37 pm Post subject: Re: How to submit patches for elogv? |
|
|
pepoluan wrote: | as a sane person I'd like it to be "YYYY-MM-DD" |
Don't mistake preference for sanity, because if it were, then for me you would be insane for not wanting it to be "DD/MM/YY".
Best Regards,
Georgi |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5084 Location: Bavaria
|
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9607 Location: beyond the rim
|
Posted: Thu Nov 07, 2024 3:00 pm Post subject: Re: How to submit patches for elogv? |
|
|
logrusx wrote: | pepoluan wrote: | as a sane person I'd like it to be "YYYY-MM-DD" |
Don't mistake preference for sanity, because if it were, then for me you would be insane for not wanting it to be "DD/MM/YY".
|
Well, he wants it to be something else than MM/DD/YY, that by definition makes him not insane. And DD/MM/YY has the issue that in many cases it can be mixed up with MM/DD/YY.
YYYY-MM-DD on the other hand is an international standard. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2397
|
Posted: Thu Nov 07, 2024 3:07 pm Post subject: |
|
|
pietinger wrote: | If you want to sort by date |
I don't. I just want to make a point.
Best Regards,
Georgi |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22610
|
Posted: Thu Nov 07, 2024 3:16 pm Post subject: |
|
|
MM/DD/YYYY is popular in the United States among lay people, but even there, programmers tend to prefer YYYY-MM-DD for the combination of unambiguous presentation (nobody has ever advocated YYYY-DD-MM, afaik, so seeing 4 digits in the first position can be assumed to be YYYY-MM-DD form) and natural sorting. That latter is pietinger's point: if one ever finds the need to sort by date, YYYY-MM-DD is optimal. In my experience, it is fairly common for people to want to sort by date, so people who are aware of date formatting tend to reach for this form as the first step. It's almost always easier to do that than to try to teach the sorting tool to carve out pieces of the date in the right order. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2397
|
Posted: Thu Nov 07, 2024 3:33 pm Post subject: |
|
|
My point is using other formats is not insane and I will end it here. The world is not only the US and dates are not only to be sorted, but also read by humans. In no way the date format is a sign of sanity.
Best Regards,
Georgi
p.s. I have no idea what there is to sort in elogv. Messages are already sorted in chronological order. Sorting point - irrelevant. |
|
Back to top |
|
|
|