datetime.cc
来自「有关MYSQL的开源码」· CC 代码 · 共 52 行
CC
52 行
#include "mysqlcppapi/datetime/DateTime.h"#include <iomanip>namespace mysqlcppapi{DateTime::DateTime(){}DateTime::~DateTime(){}std::ostream& DateTime::out_stream(std::ostream& s) const{ date_base::out_stream(s); s << " "; time_base::out_stream(s); return s;}std::string::size_type DateTime::convert(const std::string& str){ std::string::size_type iResult = date_base::convert(str); if (str.at(iResult) == ' ') iResult++; iResult = time_base::convert(str.substr(iResult)); return iResult;}short int DateTime::compare(const DateTime& other) const{ int x; x = date_base::compare(&other); if (x) return x; return time_base::compare(&other);}} //namespace
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?