https://github.com/codeupjewell/ruby-date
Demonstration of Date class
https://github.com/codeupjewell/ruby-date
Last synced: about 1 year ago
JSON representation
Demonstration of Date class
- Host: GitHub
- URL: https://github.com/codeupjewell/ruby-date
- Owner: CodeUpJewell
- Created: 2023-03-09T00:35:24.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-09T00:37:08.000Z (about 3 years ago)
- Last Synced: 2025-01-21T18:49:21.931Z (over 1 year ago)
- Language: Ruby
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
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.
```bash
"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`.
```bash
"Ruby is 108937 days old!"
```
### date_monday.rb
Should output:
```bash
"Is today Monday? true"
```
if today is Monday, or
```bash
"Is today Monday? false"
```
if today is _not_ Monday.
## Specs
Click here to see names of each test
date_math.rb should output '8959' when today is Jul 1, 2020
date_math.rb is not 'hard-coded' to the current date'
date_formatted.rb outputs 'The year is: 2020, the calendar day is: 1, and the month is: 7.' when today is July 1, 2020
date_formatted.rb outputs the formatted dates for any past/future date
date_formatted.rb should output 'Is today Monday? false', when today is not Monday
date_monday.rb should output 'Is today Monday? false', when today is not Monday
date_monday.rb should output 'Is today Monday? false', when today is not Monday