Open Stoozy opened 1 year ago
It means to generate current date and time in YYYY-MM-DD
format and return it. Or take a date in any format and extract date and return into the required format? Can you clarify me, so that i can contribute under hacktoberfest 2023?
One way to prevent calling parse_date
during runtime would be to cache every valid event (making sure the event is in between start_date
and end_date
). Take a look at market.cc, validate the events as I do now, then keep it in a vector before actually running the market simulation. There would be no reason to parse every event, it's already in the vector.
Currently,
parse_date
in the util.cc file gets called every event in order to check if the date and time is in range ofstart_date
andend_date
found in the config file. Need a way to optimize this or get rid of it completely.