You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Time::DATE_FORMATS[:day_name_long_at_time]="%A, %B %-d, %Y, at %-I:%M %P"
Which gives me nice human-readable times like this:
'Thursday, October 4, 2012, at 5:00 pm'
I don't know if you're aiming for full feature parity with Ruby's strftime (probably not), but I noticed you had added some other nice Ruby extensions so I'm hoping you'll add this one.... because really, who wants to have their dates formatted as October 04 instead of October 4? :)
Here's the relevant section of ri strftime:
The directive consists of a percent (%) character,
zero or more flags, optional minimum field width,
optional modifier and a conversion specifier
as follows.
%<flags><width><modifier><conversion>
Flags:
- don't pad a numerical output.
_ use spaces for padding.
0 use zeros for padding.
^ upcase the result string.
# change case.
: use colons for %z.
The text was updated successfully, but these errors were encountered:
In Ruby, I like to use this format:
Which gives me nice human-readable times like this:
I don't know if you're aiming for full feature parity with Ruby's strftime (probably not), but I noticed you had added some other nice Ruby extensions so I'm hoping you'll add this one.... because really, who wants to have their dates formatted as
October 04
instead ofOctober 4
? :)Here's the relevant section of
ri strftime
:The text was updated successfully, but these errors were encountered: