{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/14237","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/14237/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/14237/comments","events_url":"https://api.github.com/repos/rails/rails/issues/14237/events","html_url":"https://github.com/rails/rails/issues/14237","id":28542638,"number":14237,"title":"Discrepancy between `date.to_s(:long)` and `l(date, format: :long)`","user":{"login":"gabrielecirulli","id":886011,"avatar_url":"https://avatars.githubusercontent.com/u/886011?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielecirulli","html_url":"https://github.com/gabrielecirulli","followers_url":"https://api.github.com/users/gabrielecirulli/followers","following_url":"https://api.github.com/users/gabrielecirulli/following{/other_user}","gists_url":"https://api.github.com/users/gabrielecirulli/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielecirulli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielecirulli/subscriptions","organizations_url":"https://api.github.com/users/gabrielecirulli/orgs","repos_url":"https://api.github.com/users/gabrielecirulli/repos","events_url":"https://api.github.com/users/gabrielecirulli/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielecirulli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/activesupport","name":"activesupport","color":"FC9300"},{"url":"https://api.github.com/repos/rails/rails/labels/attached%20PR","name":"attached PR","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2014-02-28T23:47:29Z","updated_at":"2016-08-06T07:26:22Z","closed_at":"2016-08-06T07:26:22Z","body":"This is happening on my Rails 4.0.3 app but seems to also be present in master.\r\n\r\nThere seems to be a discrepancy between the `:long` format [defined in `Date::DATE_FORMATS`](https://github.com/rails/rails/blob/c6897b7d7b18b5c89aca46d4595b47c2590ce335/activesupport/lib/active_support/core_ext/date/conversions.rb#L9) (`%B %e, %Y`) and the one [defined in the default `locale/en.yml`](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/locale/en.yml#L9) (`%B %d, %Y`).\r\n\r\nNamely, the `%e` parameter in the former causes the rendered date to have two spaces between the month and the day when the day is single-digit, due to the fact that it pads the day number with spaces. The latter instead pads the day number with zeroes.\r\n\r\nIs this discrepancy known of? I discovered it today while testing, because I used `to_s(:long)` in my test and the `l` helper in my view.\r\n\r\nIn my opinion, the date should be displayed without leading zeros on the day but also without repeated spaces. A format string of `%B %-e, %Y` seems to accomplish this."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/238010599","html_url":"https://github.com/rails/rails/issues/14237#issuecomment-238010599","issue_url":"https://api.github.com/repos/rails/rails/issues/14237","id":238010599,"user":{"login":"pixeltrix","id":6321,"avatar_url":"https://avatars.githubusercontent.com/u/6321?v=3","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T07:26:22Z","updated_at":"2016-08-06T07:26:22Z","body":"@alexcameron89 thanks 👍 "}}
{"actor":{"display_login":"pixeltrix"}}