Skip to content

gbunch-appdev/date-chapter

 
 

Repository files navigation

Ruby Practice

Run your Ruby file by typing ruby and then the name of the file you want to run in the Terminal.

If we want to run date_math.rb, we can write the command:

ruby date_math.rb

To re-run this command, you can use the UP and DOWN arrow keys to look at the history of commands you've run in a Terminal.

Date

date_formatted.rb

Should format and identify different parts of todays date.

"The year is: 2020, the calendar day is: 1, and the month is: 7."

date_math.rb

Should output the number of days since Ruby was made.

Ruby released to the public on December 21, 1995.

"Ruby is 108937 days old!"

date_monday.rb

Should output:

Is today Monday? true

if today is Monday, or

Is today Monday? false

if today is not Monday.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 98.3%
  • Shell 1.7%