From cf9d0332f6b4dcd7dc388133ffd8fd6edd07e1c1 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 16 May 2017 17:44:28 +0300 Subject: Add to_string(timestamp) --- libbutl/timestamp.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libbutl/timestamp.hxx') diff --git a/libbutl/timestamp.hxx b/libbutl/timestamp.hxx index 1a960b7..9fb0f59 100644 --- a/libbutl/timestamp.hxx +++ b/libbutl/timestamp.hxx @@ -88,6 +88,15 @@ namespace butl bool special, bool local); + // Same as above, but provide the result as string. Note that it is + // implemented via to_stream() and std::ostringstream. + // + LIBBUTL_EXPORT std::string + to_string (const timestamp&, + const char* format, + bool special, + bool local); + inline std::ostream& operator<< (std::ostream& os, const timestamp& ts) { -- cgit v1.1