I need to develop new date class in ruby rather then built in date class
program needs to do these things below
- Read a series of dates from an ASCII text file. You can assume that
all dates in the file are in an acceptable format, with the elements in
the order day, month and year, with the separator being any non-numeric
character. A suitable input file is provided on the course web site.
- If a date is in error, use exceptions to handle the error and
discard any erroneous dates. Any error messages should be displayed to
- Sort the valid dates read from the text file into ascending order.
- Dates should be able to be displayed in two formats â€“ either
17/07/2008 or 17th July 2008.
- Implement an increment method that increments the date by a day
22 07 2008
I’m new in ruby just need some help at least for a start.