Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-02 08:19:45

0001 //
0002 // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #ifndef BOOST_MYSQL_IMPL_DATETIME_IPP
0009 #define BOOST_MYSQL_IMPL_DATETIME_IPP
0010 
0011 #pragma once
0012 
0013 #include <boost/mysql/datetime.hpp>
0014 #include <boost/mysql/string_view.hpp>
0015 
0016 #include <boost/mysql/impl/internal/dt_to_string.hpp>
0017 
0018 #include <cstddef>
0019 #include <ostream>
0020 
0021 std::ostream& boost::mysql::operator<<(std::ostream& os, const datetime& value)
0022 {
0023     char buffer[64]{};
0024     std::size_t sz = detail::datetime_to_string(
0025         value.year(),
0026         value.month(),
0027         value.day(),
0028         value.hour(),
0029         value.minute(),
0030         value.second(),
0031         value.microsecond(),
0032         buffer
0033     );
0034     os << string_view(buffer, sz);
0035     return os;
0036 }
0037 
0038 #endif