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 trialJesse Fister
11,968 PointsUsing the today method on the Date class, assign today's date to a variable called today.
Using the today method on the Date class, assign today's date to a variable called today.
my code is:
Date.today = today
I can't figure out what they want me to do. Thanks.
date = Date.new
Date.today
2 Answers
William Li
Courses Plus Student 26,868 PointsHi Jesse.
Your use of the today
method on Date class is correct, however, like part 1 of the challenge, you need to assign that value to a variable as well.
date = Date.new
today = Date.today
Hope it makes sense.
Sean Flanagan
33,235 PointsHi William.
Thanks for your suggestion; it worked for me.
Sean
Nick Stalter
9,616 PointsNick Stalter
9,616 PointsYou may need to require the Date module in order to use Date.new/Date.today. Here is my example
Is this the kind of output you are looking for?
edited for formatting