Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/net/imap/date.rb

Instance Method Summary collapse

Instance Method Details

#imapdateObject

Formats this Time as an IMAP-style date.



7
8
9
# File 'lib/net/imap/date.rb', line 7

def imapdate
  strftime '%d-%b-%Y'
end

#imapdatetimeObject

Formats this Time as an IMAP-style datetime.

RFC 2060 doesn’t specify the format of its times. Unfortunately it is almost but not quite RFC 822 compliant. – Go Mr. Leatherpants!



19
20
21
# File 'lib/net/imap/date.rb', line 19

def imapdatetime
  strftime '%d-%b-%Y %H:%M %Z'
end