From b4a2cf2ecf0f62bb98f926b03a85458c338cdc17 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Korotenko" Date: Sat, 15 Nov 2025 12:30:25 +0300 Subject: [PATCH] add parser to 1D format --- dm-cli/Deals.cpp | 49 ++++++++++++++++++++++++++++++++++++-- dm-cli/Deals.hpp | 2 +- dm-cli/dm-cli | Bin 3140992 -> 0 bytes dm-cli/test.cmd | 4 +++- vc/dm-cli.vcxproj | 3 +++ vc/dm-cli.vcxproj.filters | 3 +++ 6 files changed, 57 insertions(+), 4 deletions(-) delete mode 100644 dm-cli/dm-cli diff --git a/dm-cli/Deals.cpp b/dm-cli/Deals.cpp index b42cdd9..53e9487 100644 --- a/dm-cli/Deals.cpp +++ b/dm-cli/Deals.cpp @@ -10,6 +10,7 @@ #include "cleanHtml.h" #include #include +#include using namespace std; @@ -53,7 +54,7 @@ int Deals::HelpDealNegative() const PrintFile(DEAL_NEGATIVE_EN); return 0; } -Deals::Deals(const InputParser &parser, const bool isRussian, const string address, bool isDebug) +Deals::Deals(const InputParser& parser, const bool isRussian, const string address, bool isDebug) { this->parser = parser; this->isRussian = isRussian; @@ -131,6 +132,7 @@ int Deals::Create() } else { + pay = GetDate(pay); string untl(",\"until\": \""); untl.append(pay); untl.append("\""); @@ -144,7 +146,7 @@ int Deals::Create() } else { - + leave_before = GetDate(leave_before); string untl(",\"feedback\": {\"leave-before\": \""); untl.append(leave_before); untl.append("\"}"); @@ -168,6 +170,49 @@ int Deals::Create() return 0; } +string Deals::GetDate(const string date) { + string buffer = date; + /* + -p|--pay { [hh:mm:ss UTC] |