Revision c9932d80-bfc8-4b5a-99f4-8e76b6ec9f8a - Code Golf Stack Exchange

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

 "1980年05月12日" -> 12th May 1980
 "2005年12月3日" -> 3rd December 2005
 "150-4-21" -> 21st April 150
 "2011-2-29" -> (error/invalid)
 "1999-10-35" -> (error/invalid)

AltStyle によって変換されたページ (->オリジナル) /