/ruby-day-to-string

DateTime cwday/wday to String Functions

Primary LanguageRubyMIT LicenseMIT

Ruby - Functions to Convert cwday or wday to string

Table of Contents

Information

These functions take either a wday value or cwday and returns a string of the day of the week, i.e. Sunday, Monday, Tuesday, etc. This is not easily accessible in Ruby (to my knowledge) so I made a function for me and am happy to share it with you now! This function is built with Ruby v2.6.3p62. To check your version, run:

ruby -v

Status

At this time, the project is finished.

Instructions

To run these program, Ruby v2.6.3p62 (or a compatible version) will need to be installed. To check the version of ruby you are using, run this command in terminal:

ruby -v

If you do not have ruby installed, follow these instructions. After ruby is installed, you should clone this repository to a place easily accessible to you using this command in terminal:

git clone https://github.com/fussykyloren/ruby-day-to-string.git

Your github username and password should be requested. If not, don't worry about it. After the repository is cloned, you will need to change the directory to where the game example is saved. To to use the fibonacci programs, run this command next:

cd [LOCATION_OF_CLONED_REPOSITORY]

Now you can move the ruby file to where you will need to use it! This can be done using this command:

mv [LOCATION_OF_CLONED_REPOSITORY]/day-to-string.rb [LOCATION_TO_MOVE_FILE]

Or if you'd prefer, you can copy the file using this command:

cp [LOCATION_OF_CLONED_REPOSITORY]/day-to-string.rb [LOCATION_TO_MOVE_FILE]