aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/QUtil.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-30 15:00:36 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-31 02:03:08 +0200
commit04fc7c4bea9b4efa38a7398b6db56a8fe5273bfb (patch)
tree4148a27d5f8f2d01681d1c6c41b9fceabe2a1042 /include/qpdf/QUtil.hh
parent6a7c45838171fd8cc4508d09626e27d9066bb39d (diff)
downloadqpdf-04fc7c4bea9b4efa38a7398b6db56a8fe5273bfb.tar.zst
Add conversions to ISO-8601 date format
Diffstat (limited to 'include/qpdf/QUtil.hh')
-rw-r--r--include/qpdf/QUtil.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 283db861..32aeae1f 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -284,6 +284,10 @@ namespace QUtil
QPDF_DLL
std::string qpdf_time_to_pdf_time(QPDFTime const&);
+ // Convert QPDFTime to a second-granularity ISO-8601 timestamp.
+ QPDF_DLL
+ std::string qpdf_time_to_iso8601(QPDFTime const&);
+
// Convert a PDF timestamp string to a QPDFTime. If syntactically
// valid, return true and fill in qtm. If not valid, return false,
// and do not modify qtm. If qtm is null, just check the validity
@@ -291,6 +295,11 @@ namespace QUtil
QPDF_DLL
bool pdf_time_to_qpdf_time(std::string const&, QPDFTime* qtm = nullptr);
+ // Convert PDF timestamp to a second-granularity ISO-8601
+ // timestamp. If syntactically valid, return true and initialize
+ // iso8601. Otherwise, return false.
+ bool pdf_time_to_iso8601(std::string const& pdf_time, std::string& iso8601);
+
// Return a string containing the byte representation of the UTF-8
// encoding for the unicode value passed in.
QPDF_DLL