I have two strings. One is the format, and one is the output.
For example: var string1 = "January 21 2015'; var string2 = '21 01, 15'
What I would like to do is manipulate string1 to include the date ordinals - which is fine and I can do.
Where I am struggling is how to work out where to insert the ordinal based on string2.
What would you suggest is the best way of doing this.
I already have the code to check the date number and insert the relevant ordinal but I need to work out where in the string to insert it.
The outcome should be...
21st January 2015