Convert short date format into English long date in as few bytes as possible.
#Input
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
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
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)
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)
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)
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)
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).
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)
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)
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).
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
"2002"150-4-21" -> 21st April 2002150
"2011-2-29" -> (error/invalid)
"1999-10-35" -> (error/invalid)
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).
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
"2002-4-21" -> 21st April 2002
"2011-2-29" -> (error/invalid)
"1999-10-35" -> (error/invalid)
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).
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)
- 1.3k
- 1
- 8
- 14