You can use Regular Expressions to extract the day and month. Then, store all the names of the months in an array and use the .startsWith to obtain the proper name of the month. You can use a simple case to see if you need the 'st', 'nd', 'rd' or 'th'.