def test_convert_date_val_to_date(): assert ( chart_utils.convert_date_val_to_date("2020-01-01").strftime("%Y%m%d") == "20200101" ) assert ( chart_utils.convert_date_val_to_date(1577854800000).strftime("%Y%m%d") == "20200101" )
def _build_val(col, val): if classify_type(find_dtype(data[col])) == "D": return json_date(convert_date_val_to_date(val)) return val