Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Christopher Phillips
Christopher Phillips
10,061 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 .