THE FOLLOWING IMAGE SHOWS THE STRING FORMAT OF JAVASCRIPT
CONVERSION CODE IS HERE
Map <String, Integer> monthNames = new Map <String, Integer> {'Jan'=>1, 'Feb'=>2, 'Mar'=>3, 'Apr'=>4, 'May'=>5, 'Jun'=>6, 'Jul'=>7, 'Aug'=>8, 'Sep'=>9, 'Oct'=>10, 'Nov'=>11, 'Dec'=>12};
extendAppEnd = 'Sun May 31 2015 09:30:00 GMT+0000';
//split the string based on spaces first
List <String> stringParts = extendAppEnd.split(' ');
The list after spliting like the follow values
/*stringParts[0] = 'Sun'
stringParts[1] = 'May'
stringParts[2] = '31'
stringParts[3] = '2015'
stringParts[4] = '09:30:00'
stringParts[5] = 'GMT+0000' */
//and split the time string based on ( : ).
List <String> timeParts = stringParts[4].split(':');
he list after spliting like the follow values
/*timeParts [0] = 09
timeParts [1] = 30
timeParts [2] = 00*/
DateTime dt= DateTime.newInstanceGmt(Integer.valueOf(stringParts[3]), monthNames.get(stringParts[1]), Integer.valueOf(stringParts[2]), Integer.valueOf(timeParts[0]), Integer.valueOf(timeParts[1]), Integer.valueOf(timeParts[2]));
OUTPUT
2015,5,31,09,30,00