def parse_datetime(datetime_input):
    """The arrow library is sadly not good enough to parse
    certain date strings. It even gives unexpected results for partial
    date strings such as '2015-01' or just '2015', which I think
    should be seen as 'the first moment of 2014'.
    This function should overcome those limitations."""
    date_els, time_els = _split_datetime(datetime_input)
    date_vals = _parse_date(date_els)
    time_vals = _parse_time(time_els)
    vals = tuple(date_vals) + tuple(time_vals)
    return arrow.get(*vals)