instance method
strftime
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
strftime( fmt, default = nil )
Returns the time of the mail message formatted to your taste using a strftime format string. If no date set returns nil by default or whatever value you pass as the second optional parameter.
time = Time.now # (on Nov 16 2007) mail.date = time mail.strftime("%D") #=> "11/16/07"
Parameters
-
fmtreq -
defaultopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 148
def strftime( fmt, default = nil )
if t = date
t.strftime(fmt)
else
default
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb line 148
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail