aboutsummaryrefslogtreecommitdiff
path: root/libbutl/timestamp.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-16 17:44:28 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-16 17:44:28 +0300
commitcf9d0332f6b4dcd7dc388133ffd8fd6edd07e1c1 (patch)
tree109d6ec69c93920d2db08f7ec072ba8de270a032 /libbutl/timestamp.hxx
parented3f024f40771c90e0eb7ef5a51e7e01ab0247d4 (diff)
Add to_string(timestamp)
Diffstat (limited to 'libbutl/timestamp.hxx')
-rw-r--r--libbutl/timestamp.hxx9
1 files changed, 9 insertions, 0 deletions
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)
{