Add GncDateTime::timestamp().

To provide a C++ implementation of gnc_date_timestamp and to avoid
using the expensive and localized GncDateTime::format().
This commit is contained in:
John Ralls
2019-01-05 14:53:25 -08:00
parent 793fb1a3ed
commit cee97be8d4
3 changed files with 21 additions and 2 deletions

View File

@@ -152,7 +152,11 @@ public:
* @return a std::string in the format YYYY-MM-DD HH:MM:SS.
*/
std::string format_iso8601() const;
/** Get an undelimited string representing the current date and time.
* @return a std::string in the format YYYYMMDDHHMMSS.
*/
static std::string timestamp();
private:
std::unique_ptr<GncDateTimeImpl> m_impl;
};