[openstreetmap/openstreetmap-website] Add expansion of time info on touch and mouse activation (PR #4361)

Andy Allan notifications at github.com
Wed Nov 22 10:58:08 UTC 2023


> It comes from `l(date, :format => :friendly)` where I have no idea which component implements this.

The `:friendly` formats are controlled by our locale files, for example in en.yml there is:

```
en:
  time:
    formats:
      friendly: "%e %B %Y at %H:%M"
```

The format codes are from ruby [strftime](https://docs.ruby-lang.org/en/3.2/strftime_formatting_rdoc.html), where `%e` means "Day of the month, in range (1..31), blank-padded:" and `%-d` would be the same but without the padding.

Note that each locale has its own formatting, e.g. japanese (ja) is `'%Y年%m月%e日 %H:%M'`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4361#issuecomment-1822547211
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4361/c1822547211 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231122/0bb3bce4/attachment.htm>


More information about the rails-dev mailing list