Short Date into English Long Date Convert short date format into English long date in as few bytes as possible.
Input
Input will be in the form of a string with format, yyyy-mm-dd, with zero padding optional for all values. You can assume that this is syntactically correct, but not necessarily a valid date. Negative year values do not need to be supported.
Output
You must convert the date into the English long date format (e.g. 14th February 2017). Zero padding here is not allowed.
If the date is invalid (e.g. 2011-02-29), then this must be recognised in some way. Throwing an exception is allowed.
More examples can be seen below.
Test Cases
&quot;1980-05-12&quot; -&gt; 12th May 1980
&quot;2005-12-3&quot;  -&gt; 3rd December 2005
&quot;150-4-21&quot;   -&gt; 21st April 150
&quot;2011-2-29&quot;  -&gt; (error/invalid)
&quot;1999-10-35&quot; -&gt; (error/invalid)
Python 3.6, 137 129 bytes

from datetime import*
def f(k):g=[*map(int,k.split('-'))];n=g[2];return f"{date(*g):%-d{'tsnrhtdd'[n%5*(n^15&gt;4&gt;n%10)::4]} %B %Y}"


Try it online!