Implement a format identifier method for date in csv data preprocessor
Ask149 opened this issue · 3 comments
Description
The method should be able to identify and convert the date into a specific static format.
The functionality of the method can be described as below -
- Take in any type of date as input (for example - 2021-11-13)
- Identify the format (for example - YYYY-MM-DD)
- Convert the date into any desired format (for example - DD/MM/YYYY)
Assumptions
The following assumptions can be made during the implementation
- No time is present in the given input date.
- The input will be only a string.
- A list of input patterns can be assumed. (For example - you can assume the input will be in either of any known formats mentioned).
input_date_format = [ 'DD/MM/YYYY', 'YYYY/DD/MM', 'MM/DD/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY', 'YYYY-DD-MM', 'MM-DD-YYYY', 'YYYY-MM-DD' ]
Input
A string in any of the formats mentioned above (The contributor is free to add any other formats)
An expected output format the input date should be converted to
Output
A date in string converted into the desired format.
Note
The use of standard python libraries is highly recommended.
I would like to work on this issue.
Hi @abh33, thank you for your interest! You can work on the issue and contact us for any queries or clarification.
@abh33 can you please email us at contact.klareda@gmail.com for the code review?