class Time
WorksCited
extensions to Time
Public Instance Methods
mla_date()
click to toggle source
# File lib/works_cited/extensions/time.rb, line 5 def mla_date month_name = strftime('%B') return strftime('%e %B %Y') if month_name.length < 5 strftime('%e %b. %Y') end
mla_datetime()
click to toggle source
# File lib/works_cited/extensions/time.rb, line 12 def mla_datetime month_name = strftime('%B') time = if month_name.length < 5 strftime('%e %B %Y, %l:%M %P') else strftime('%e %b. %Y, %l:%M %P') end time.gsub(/([ap])m/, '\\1.m.') end