In Perl you can do:
my $current_time = DateTime->now(); my $mdy = $current_time->mdy("/");
What's the easiest way to do this in Ruby?
The strftime method can be used to format times:
strftime
Time.now.strftime("%m/%d/%Y")
1.4m articles
1.4m replys
5 comments
57.0k users