Reputation: 5248
For instance, if I called:
gmdate("M-D-yTh:i:s")
Is there something similar for this case in RoR? I guess I could always DateTime.now.hour, DateTime.now.year, etc. etc. but that seems extremely wrong.
Upvotes: 0
Views: 331
Reputation: 6914
See strftime() in Ruby's documentation on Time, which formats a time according to the directives in the given format string.
Upvotes: 1