12 hour time conversion Challenge
Convert and print out a time in a 12-hour format. HH:MM AM/PM
Examples
Input:

'Fri Jun 30 2017 21:14:20 GMT-0700 (PDT)'
'Fri Jun 30 2017 00:10:23 GMT-0700 (PDT)'
'Fri Jun 30 2017 12:10:23 GMT-0700 (PDT)'
'Sat Jun 31 2018 8:06:20 GMT-0700 (PDT)'
'Fri Jul 01 2017 01:14:20 GMT-0700 (PDT)'
'Sat Apr 10 2020 09:06:20 GMT-0700 (PDT)'

Ouput:

9:14 PM
12:10 AM
12:10 PM
08:06 AM
1:14 AM
09:06 AM

Fine Points

A zero before a one digit number is okay, no zero is also allowed. The following examples are both allowed:

9:06 AM

09:06 AM



All tested years will be after 999 (each year will be exactly 4 digits)


Rules

This is code-golf so the shortest solution in bytes wins
Standard Loopholes Apply
You may use functions as well as programs
JavaScript (ES6), 69 bytes

d=&gt;new Date(d).toLocaleString(0,{hour:n='numeric',minute:n,hour12:1})




f=
d=&gt;new Date(d).toLocaleString(0,{hour:n='numeric',minute:n,hour12:1})
console.log(
  f('Fri Jun 30 2017 21:14:20 GMT-0700 (PDT)'),
  f('Fri Jun 30 2017 00:10:23 GMT-0700 (PDT)'),
  f('Fri Jun 30 2017 12:10:23 GMT-0700 (PDT)'),
  f('Sat Jun 31 2018 8:06:20 GMT-0700 (PDT)'),
  f('Fri Jul 01 2017 01:14:20 GMT-0700 (PDT)'),
  f('Sat Apr 10 2020 09:06:20 GMT-0700 (PDT)'),
)






JavaScript (ES6), 58 55 bytes

Assumes you are in the United States.

d=&gt;new Date(d).toLocaleTimeString().replace(/:.. /,' ')




f=
d=&gt;new Date(d).toLocaleTimeString().replace(/:.. /,' ')
console.log(
  f('Fri Jun 30 2017 21:14:20 GMT-0700 (PDT)'),
  f('Fri Jun 30 2017 00:10:23 GMT-0700 (PDT)'),
  f('Fri Jun 30 2017 12:10:23 GMT-0700 (PDT)'),
  f('Sat Jun 31 2018 8:06:20 GMT-0700 (PDT)'),
  f('Fri Jul 01 2017 01:14:20 GMT-0700 (PDT)'),
  f('Sat Apr 10 2020 09:06:20 GMT-0700 (PDT)')
)






JavaScript (ES6), 81 78 bytes

Answer before outputting a leading 0 in single-digit hours was made optional and test cases without leading 0s were added.

d=&gt;([m,s]=d.slice(16).split`:`,`0${m%12||12}:${s} ${m&lt;12?'A':'P'}M`.slice(-8))




f=
d=&gt;([m,s]=d.slice(16).split`:`,`0${m%12||12}:${s} ${m&lt;12?'A':'P'}M`.slice(-8))
console.log(
  f('Fri Jun 30 2017 21:14:20 GMT-0700 (PDT)'),
  f('Sat Jun 31 2018 08:06:20 GMT-0700 (PDT)'),
  f('Fri Jul 01 2017 01:14:20 GMT-0700 (PDT)'),
  f('Sat Apr 10 2020 09:06:20 GMT-0700 (PDT)')
)