fw4spl
fromIsoExtendedString.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "fwTools/config.hpp"
10 
11 #include <boost/date_time/posix_time/posix_time.hpp>
12 
13 #include <string>
14 
15 namespace fwTools
16 {
17 
28 FWTOOLS_API boost::posix_time::ptime fromIsoExtendedString(const std::string& time_string );
29 
35 FWTOOLS_API ::boost::posix_time::ptime fromDateInXsdFormat(const std::string& date_string);
36 
42 FWTOOLS_API std::string toIsoExtendedString(boost::posix_time::ptime ptime);
43 
49 FWTOOLS_API std::string getDateInXsdFormat( const boost::posix_time::ptime& dateAndTime );
50 
52 
53 }//end namespace
The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper.
FWTOOLS_API boost::posix_time::ptime fromIsoExtendedString(const std::string &time_string)
Construct a boost ptime from a string in iso extended format (YYYY-MM-DDTHH:MM:SS) ...
FWTOOLS_API::boost::posix_time::ptime fromDateInXsdFormat(const std::string &date_string)
Construct a boost ptime from a string in xsd format (YYYY-MM-DD)
FWTOOLS_API std::string getDateInXsdFormat(const boost::posix_time::ptime &dateAndTime)
Construct a string in the format YYYY-MM-DD from a boost ptime.
FWTOOLS_API std::string toIsoExtendedString(boost::posix_time::ptime ptime)
Construct a string in iso extended format from a boost ptime.