Format Utils

Tools for formatting data, such as dates.

datetools

Tools for processing dates in data.

extract_year(date)[source]

Use search for 4 digits in a row to identify the year and return as YYYY-01-01.

Parameters:date (str) – The full date string.
Returns:integer
extract_date(date, date_format='%Y-%m-%d', return_date_object=False)[source]

Determine the date format, convert and return in YYYY-MM-DD format.

Parameters:date (str) – the full date string.
Returns:Formatted date string.