diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-16 17:44:28 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-05-16 17:44:28 +0300 |
commit | cf9d0332f6b4dcd7dc388133ffd8fd6edd07e1c1 (patch) | |
tree | 109d6ec69c93920d2db08f7ec072ba8de270a032 /libbutl/timestamp.hxx | |
parent | ed3f024f40771c90e0eb7ef5a51e7e01ab0247d4 (diff) |
Add to_string(timestamp)
Diffstat (limited to 'libbutl/timestamp.hxx')
-rw-r--r-- | libbutl/timestamp.hxx | 9 |
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) { |