Ruby Ruby Core and Standard Library Ruby Standard Library: Part 1 Timezones and Offsets

Christopher Phillips
Christopher Phillips
10,040 Points

Lack of Time documentation?

The std library documentation has converted to 2.5 as of March 2018. My concern is the amount of methods available to the Time class in 2.5 vs 2.2. Has it really taken that big of a hit or am I just looking in the wrong place?

http://ruby-doc.org/stdlib-2.5.1/libdoc/time/rdoc/index.html

1 Answer

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

It looks like you're looking only at the documentation for "core" Time, which is what is available by default. "stdlib" Time has many more methods: http://ruby-doc.org/stdlib-2.5.1/libdoc/time/rdoc/Time.html

You load the additional stdlib methods by doing a require 'time'. See also https://stackoverflow.com/questions/18505836/whats-the-difference-between-ruby-core-api-and-standard-library-api .