提交 c5abd060 编写于 作者: T Trevor Wennblom

update stdlib doc urls in comments - active_support/core_ext/[integer|numeric]/time.rb

http://stdlib.rubyonrails.org/ last updated in 2005
上级 af422bf3
......@@ -24,9 +24,9 @@ class Integer
# 1.year.to_f.from_now
#
# In such cases, Ruby's core
# Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and
# Time[http://stdlib.rubyonrails.org/libdoc/time/rdoc/index.html] should be used for precision
# date and time arithmetic
# Date[http://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and
# Time[http://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision
# date and time arithmetic.
def months
ActiveSupport::Duration.new(self * 30.days, [[:months, self]])
end
......
......@@ -28,9 +28,9 @@ class Numeric
# 1.year.to_f.from_now
#
# In such cases, Ruby's core
# Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and
# Time[http://stdlib.rubyonrails.org/libdoc/time/rdoc/index.html] should be used for precision
# date and time arithmetic
# Date[http://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and
# Time[http://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision
# date and time arithmetic.
def seconds
ActiveSupport::Duration.new(self, [[:seconds, self]])
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册