this parses N days to date N days ago for now
| 30 | |
| 31 | // this parses N days to date N days ago for now |
| 32 | std::string parseDate(const std::string &dateString, const std::string &expOperator) |
| 33 | { |
| 34 | // TODO_METADATA add semantics so different formats and meanings are supported, |
| 35 | auto now = QDateTime::currentSecsSinceEpoch(); |
| 36 | auto date = now - stoi(dateString) * 86400; |
| 37 | |
| 38 | return std::to_string(date); |
| 39 | } |
| 40 | |
| 41 | int QueryParser::TreeNode::buildSqlString(std::string &sqlString, int bindPosition) const |
| 42 | { |