These are the things that the dateMethods.js file should contain:
- An object that maps the number of the month to its name
- Four methods get different parts of the date. Each should accept an optional date object or create a new instance of the Date object if one is not passed in the following ones:
- getYear: This grabs the year number and returns a stringified form of it
- getMonth: This grabs the month number and returns a stringified form of it
- getDay: This grabs the day number and returns a stringified form of it
- getMonthString: This returns the name of the month using the object created previously
This is how my dateMethods file looks after completing the preceding bullet points. This is an object mapping month numbers to ...