user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@yhbt.net>
To: Varun Varada <varuncvarada@gmail.com>
Cc: meta@public-inbox.org
Subject: Re: [Patch] Update 24-hour times to use two digits for the hour
Date: Fri, 5 Jun 2020 22:03:21 +0000	[thread overview]
Message-ID: <20200605220321.GA17860@dcvr> (raw)
In-Reply-To: <CAD2i4DDD8XCPQ2t61VJ-f4BSGkktcBf2O89K1ARGv=C1f+reqw@mail.gmail.com>

Varun Varada <varuncvarada@gmail.com> wrote:
> Hello,
> 
> Here is a patch to update the timestamps displayed to have 2 digits
> for the hour when since it is using the 24-hour clock:

Hello Varun, thanks for your interest in the project.

But why this patch?

It's a requirement to document the "why?" for submitting any
patch to any project.

>  # human-friendly format
> -sub fmt_ts ($) { strftime('%Y-%m-%d %k:%M', gmtime($_[0])) }
> +sub fmt_ts ($) { strftime('%Y-%m-%d %H:%M', gmtime($_[0])) }

As a human with degraded eyesight, I see leading zeros from
%H as visual noise which makes numbers harder to read.

%k uses a leading space instead of zero, but still uses two
digits for >=10 hours.  Pretty much any digital clock or timer
in the real world behaves the same way.

  reply	other threads:[~2020-06-05 22:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 20:22 [Patch] Update 24-hour times to use two digits for the hour Varun Varada
2020-06-05 22:03 ` Eric Wong [this message]
2020-06-05 22:48   ` Varun Varada
2020-06-05 23:27     ` Eric Wong
2020-06-06  0:11       ` Varun Varada
2020-06-06  0:27         ` Eric Wong
2020-06-06 21:27     ` Dmitry Alexandrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200605220321.GA17860@dcvr \
    --to=e@yhbt.net \
    --cc=meta@public-inbox.org \
    --cc=varuncvarada@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).