Sha256: 4f51abb0f3c74cc1c891d9289c93553f1d193b57781bc3472b98a80d692a1dbf
Contents?: true
Size: 464 Bytes
Versions: 16
Compression:
Stored size: 464 Bytes
Contents
# frozen_string_literal: true # WorksCited extensions to Time class Time def mla_date month_name = strftime('%B') return strftime('%e %B %Y') if month_name.length < 5 strftime('%e %b. %Y') end 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 end
Version data entries
16 entries across 16 versions & 1 rubygems