module ArelExtensions::DateDuration
Public Instance Methods
day()
click to toggle source
function returns the month (as a number) given a date value.
# File lib/arel_extensions/date_duration.rb, line 23 def day ArelExtensions::Nodes::Duration.new 'd', self end
format(tpl, time_zone = nil)
click to toggle source
# File lib/arel_extensions/date_duration.rb, line 43 def format(tpl, time_zone = nil) ArelExtensions::Nodes::Format.new [self, tpl, time_zone] end
hour()
click to toggle source
# File lib/arel_extensions/date_duration.rb, line 31 def hour ArelExtensions::Nodes::Duration.new 'h', self end
minute()
click to toggle source
# File lib/arel_extensions/date_duration.rb, line 35 def minute ArelExtensions::Nodes::Duration.new 'mn', self end
month()
click to toggle source
function returns the month (as a number) given a date value.
# File lib/arel_extensions/date_duration.rb, line 13 def month ArelExtensions::Nodes::Duration.new 'm', self end
second()
click to toggle source
# File lib/arel_extensions/date_duration.rb, line 39 def second ArelExtensions::Nodes::Duration.new 's', self end
wday()
click to toggle source
# File lib/arel_extensions/date_duration.rb, line 27 def wday ArelExtensions::Nodes::Duration.new 'wd', self end
week()
click to toggle source
function returns the week (as a number) given a date value.
# File lib/arel_extensions/date_duration.rb, line 18 def week ArelExtensions::Nodes::Duration.new 'w', self end
year()
click to toggle source
function returns the year (as a number) given a date value.
# File lib/arel_extensions/date_duration.rb, line 8 def year ArelExtensions::Nodes::Duration.new 'y', self end