Skip to content

Code Challenge: Write a function or method that accepts two mandatory arguments and returns a result. The first agrument is a time string and the second argument is a minutes integer.

Notifications You must be signed in to change notification settings

rboldway/ruby-method-add-minutes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Challenge Write a function or method that accepts two mandatory arguments and returns a result. Requirements: Use Ruby or another language of your choosing, and write production quality code. Your function or method should not use any date/time library. The first argument is a time value in the form of a string with the following

format:

[H]H:MM {AM|PM}

The second argument is the number of minutes, as an integer value. The return value of the function should be a string of the same format as the first argument, which is a result of adding the minutes to the time.

For example would return

add_minutes('9:13 AM', 10) 9:23 AM • • • • • • • . o. Additional Notes: We just want to see how you code, so this exercise is not meant to be too hard or take too long. If you spend an hour on this, stop coding and finalize by adding some notes about

About

Code Challenge: Write a function or method that accepts two mandatory arguments and returns a result. The first agrument is a time string and the second argument is a minutes integer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages