Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/zenweb/extensions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#dateObject

Format as YYYY-MM-DD



43
44
45
# File 'lib/zenweb/extensions.rb', line 43

def date
  strftime "%Y-%m-%d"
end

#datetimeObject

Format as YYYY-MM-DD @ HH:MM



54
55
56
# File 'lib/zenweb/extensions.rb', line 54

def datetime
  strftime "%Y-%m-%d @ %H:%M"
end

#timeObject

Format as HH:MM



61
62
63
# File 'lib/zenweb/extensions.rb', line 61

def time
  strftime "%H:%M"
end

#ymObject



47
48
49
# File 'lib/zenweb/extensions.rb', line 47

def ym
  strftime "%Y-%m"
end