File indexing completed on 2025-01-18 09:42:42
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_MYSQL_IMPL_DATE_IPP
0009 #define BOOST_MYSQL_IMPL_DATE_IPP
0010
0011 #pragma once
0012
0013 #include <boost/mysql/date.hpp>
0014
0015 #include <cstdio>
0016 #include <ostream>
0017
0018 std::ostream& boost::mysql::operator<<(std::ostream& os, const date& value)
0019 {
0020
0021 char buffer[32]{};
0022 snprintf(
0023 buffer,
0024 sizeof(buffer),
0025 "%04u-%02u-%02u",
0026 static_cast<unsigned>(value.year()),
0027 static_cast<unsigned>(value.month()),
0028 static_cast<unsigned>(value.day())
0029 );
0030 os << buffer;
0031 return os;
0032 }
0033
0034 #endif