Skip to content

Instantly share code, notes, and snippets.

@ravionrails
Last active December 28, 2015 21:08
Show Gist options
  • Save ravionrails/7562044 to your computer and use it in GitHub Desktop.
Save ravionrails/7562044 to your computer and use it in GitHub Desktop.
to get datetime format 20th Nov 2013 in rails 4
date_time_obj = Time.now
date_time_obj.strftime("%d#{ordinalize[date_time_obj.day]} %b %Y")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment