Browse Source

added variable 'isodate' for substitution in headers/footers

This is in addition to the locale-dependent 'date' variable, as
the server system locale where wkhtmltopdf is launched is not always
a good default choice. Closes #1772
theirix 11 years ago
parent
commit
86ce2a14cd
4 changed files with 4 additions and 0 deletions
  1. 1 0
      AUTHORS
  2. 1 0
      CHANGELOG.md
  3. 1 0
      src/lib/pdfconverter.cc
  4. 1 0
      src/pdf/pdfdocparts.cc

+ 1 - 0
AUTHORS

@@ -30,6 +30,7 @@ Adam Thorsen        <adam.thorsen@gmail.com>
 Emmanuel Bouthenot  <kolter@openics.org>
 Artem Butusov       <art.sormy@gmail.com>
 Michael Nitze       <michael.nitze@online.de>
+theirix             <theirix@gmail.com>
 rainabba
 Mehdi Abbad
 Lyes Amazouz

+ 1 - 0
CHANGELOG.md

@@ -1,6 +1,7 @@
 v0.12.2 (unreleased)
 --------------------
 * **#1758**: fix corrupt image when output is specified as "-" in wkhtmltoimage on Windows
+* **#1772**: added variable 'isodate' for substitution in headers/footers
 * **#1808**: fix [sitepage] and [sitepages] not working without HTML headers/footers
 
 v0.12.1 (2014-06-26)

+ 1 - 0
src/lib/pdfconverter.cc

@@ -584,6 +584,7 @@ void PdfConverterPrivate::fillParms(QHash<QString, QString> & parms, int page, c
 	QDateTime t(QDateTime::currentDateTime());
 	parms["time"] = t.time().toString(Qt::SystemLocaleShortDate);
 	parms["date"] = t.date().toString(Qt::SystemLocaleShortDate);
+	parms["isodate"] = t.date().toString(Qt::ISODate);
 }
 
 

+ 1 - 0
src/pdf/pdfdocparts.cc

@@ -173,6 +173,7 @@ void PdfCommandLineParser::outputHeaderFooterDoc(Outputter * o) const {
 " * [section]    Replaced by the name of the current section\n"
 " * [subsection] Replaced by the name of the current subsection\n"
 " * [date]       Replaced by the current date in system local format\n"
+" * [isodate]    Replaced by the current date in ISO 8601 extended format\n"
 " * [time]       Replaced by the current time in system local format\n"
 " * [title]      Replaced by the title of the of the current page object\n"
 " * [doctitle]   Replaced by the title of the output document\n"