Returns the date of the email message as per the "date" header value or returns nil by default (if no date field exists).
You can also pass whatever default you want into this method and it will return that instead of nil if there is no date already set.
Source Code
# File action_mailer/vendor/tmail-1.2.2/tmail/interface.rb, line 115 def date( default = nil ) if h = @header['date'] h.date else default end end
<code/>and<pre/>for code samples.