Index: pykota/trunk/docs/dumpykota.sgml
===================================================================
--- pykota/trunk/docs/dumpykota.sgml (revision 2236)
+++ pykota/trunk/docs/dumpykota.sgml (revision 2266)
@@ -60,5 +60,8 @@
     be ANDed together to select only certain records in the database.
     For example the filter expression <literal>username=jerome</literal>
-    would only dump datas pertaining to user <literal>jerome</literal>.
+    would only dump datas pertaining to user <literal>jerome</literal>
+    while the filter expression <literal>start=2005</literal> used
+    when dumping the history would only dump jobs printed during
+    the year <literal>2005</literal>.
   </para>
   
@@ -66,5 +69,5 @@
     Several keys like <literal>username</literal> are possible, but some
     only apply to certain data types. Using a key which is not supported
-    for a particular data type will return an empty result.
+    for a particular data type may return an incorrect result.
     <tip><title>Tip</title>
       <para>
Index: pykota/trunk/bin/dumpykota
===================================================================
--- pykota/trunk/bin/dumpykota (revision 2218)
+++ pykota/trunk/bin/dumpykota (revision 2266)
@@ -90,4 +90,6 @@
          hostname       Client's hostname
          billingcode    Job's billing code
+         start          Job's date of printing
+         end            Job's date of printing
          
   Contrary to other PyKota management tools, wildcard characters are not 
@@ -111,4 +113,9 @@
   
   Dumps the job history for user jerome on printer HP2100 only.
+  
+  $ dumpykota --data history start=200503 end=20050730234615
+  
+  Dumps all jobs printed between March 1st 2005 at midnight and
+  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
   
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/sv_SE/dumpykota.1
===================================================================
--- pykota/trunk/man/sv_SE/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/sv_SE/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/pt/dumpykota.1
===================================================================
--- pykota/trunk/man/pt/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/pt/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/tr/dumpykota.1
===================================================================
--- pykota/trunk/man/tr/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/tr/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/el_GR/dumpykota.1
===================================================================
--- pykota/trunk/man/el_GR/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/el_GR/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/de/dumpykota.1
===================================================================
--- pykota/trunk/man/de/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/de/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/nb_NO/dumpykota.1
===================================================================
--- pykota/trunk/man/nb_NO/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/nb_NO/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/zh_TW/dumpykota.1
===================================================================
--- pykota/trunk/man/zh_TW/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/zh_TW/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/pt_BR/dumpykota.1
===================================================================
--- pykota/trunk/man/pt_BR/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/pt_BR/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/fr/dumpykota.1
===================================================================
--- pykota/trunk/man/fr/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/fr/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Exporte le contenu de la base de donn� de PyKota.
@@ -87,4 +87,10 @@
 billingcode
 Code de facturation du travail d'impression
+.TP
+start
+Date du travail d'impression
+.TP
+end
+Date du travail d'impression
 .IP
 Contrairement aux autres outils d'administration de PyKota, les caract�s
@@ -110,4 +116,9 @@
 Exporte l'historique des travaux de l'utilisateur jerome sur l'imprimante
 HP2100 seulement.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Exporte tous les travaux imprim�entre le 1er Mars 2005 �inuit et
+le 30 Juillet 2005 �3 heures 46 minutes et 15 secondes inclus.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/es/dumpykota.1
===================================================================
--- pykota/trunk/man/es/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/es/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/th/dumpykota.1
===================================================================
--- pykota/trunk/man/th/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/th/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/it/dumpykota.1
===================================================================
--- pykota/trunk/man/it/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/it/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "mai 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-dumpykota \- page de manuel de dumpykota 1.22_unofficial
+dumpykota \- page de manuel de dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/man/dumpykota.1
===================================================================
--- pykota/trunk/man/dumpykota.1 (revision 2237)
+++ pykota/trunk/man/dumpykota.1 (revision 2266)
@@ -2,7 +2,7 @@
 .TH DUMPYKOTA "1" "May 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NAME
-dumpykota \- manual page for dumpykota 1.22_unofficial
+dumpykota \- manual page for dumpykota 1.23alpha4_unofficial
 .SH DESCRIPTION
-dumpykota v1.22_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
+dumpykota v1.23alpha4_unofficial (c) 2003, 2004, 2005 C@LL \- Conseil Internet & Logiciels Libres
 .PP
 Dumps PyKota database's content.
@@ -80,4 +80,10 @@
 billingcode
 Job's billing code
+.TP
+start
+Job's date of printing
+.TP
+end
+Job's date of printing
 .IP
 Contrary to other PyKota management tools, wildcard characters are not
@@ -101,4 +107,9 @@
 .IP
 Dumps the job history for user jerome on printer HP2100 only.
+.IP
+\f(CW$ dumpykota --data history start=200503 end=20050730234615\fR
+.IP
+Dumps all jobs printed between March 1st 2005 at midnight and
+July 30th 2005 at 23 hours 46 minutes and 15 secondes included.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: pykota/trunk/NEWS
===================================================================
--- pykota/trunk/NEWS (revision 2265)
+++ pykota/trunk/NEWS (revision 2266)
@@ -22,4 +22,9 @@
 PyKota NEWS :
        
+    - 1.23alpha4 :
+    
+        - The data dumper now accept start= and end= to specify the starting
+          and ending dates to dump the history.
+          
     - 1.23alpha3 :
     
Index: pykota/trunk/po/sv_SE/pykota.po
===================================================================
--- pykota/trunk/po/sv_SE/pykota.po (revision 2228)
+++ pykota/trunk/po/sv_SE/pykota.po (revision 2266)
@@ -203,4 +203,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -224,4 +226,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/pt/pykota.po
===================================================================
--- pykota/trunk/po/pt/pykota.po (revision 2228)
+++ pykota/trunk/po/pt/pykota.po (revision 2266)
@@ -200,4 +200,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -221,4 +223,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/tr/pykota.po
===================================================================
--- pykota/trunk/po/tr/pykota.po (revision 2228)
+++ pykota/trunk/po/tr/pykota.po (revision 2266)
@@ -247,4 +247,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -268,4 +270,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/pt_BR/pykota.po
===================================================================
--- pykota/trunk/po/pt_BR/pykota.po (revision 2228)
+++ pykota/trunk/po/pt_BR/pykota.po (revision 2266)
@@ -200,4 +200,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -221,4 +223,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/es/pykota.po
===================================================================
--- pykota/trunk/po/es/pykota.po (revision 2228)
+++ pykota/trunk/po/es/pykota.po (revision 2266)
@@ -258,4 +258,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -279,4 +281,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/fr/pykota.po
===================================================================
--- pykota/trunk/po/fr/pykota.po (revision 2228)
+++ pykota/trunk/po/fr/pykota.po (revision 2266)
@@ -254,4 +254,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -275,4 +277,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
@@ -359,4 +366,6 @@
 "         hostname       Nom d'h�de la machine cliente\n"
 "         billingcode    Code de facturation du travail d'impression\n"
+"         start          Date du travail d'impression\n"
+"         end            Date du travail d'impression\n"
 "         \n"
 "  Contrairement aux autres outils d'administration de PyKota, les "
@@ -383,4 +392,9 @@
 "  Exporte l'historique des travaux de l'utilisateur jerome sur l'imprimante\n"
 "  HP2100 seulement.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Exporte tous les travaux imprim�entre le 1er Mars 2005 �inuit et\n"
+"  le 30 Juillet 2005 �3 heures 46 minutes et 15 secondes inclus.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/de/pykota.po
===================================================================
--- pykota/trunk/po/de/pykota.po (revision 2228)
+++ pykota/trunk/po/de/pykota.po (revision 2266)
@@ -244,4 +244,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -265,4 +267,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/el_GR/pykota.po
===================================================================
--- pykota/trunk/po/el_GR/pykota.po (revision 2228)
+++ pykota/trunk/po/el_GR/pykota.po (revision 2266)
@@ -240,4 +240,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -261,4 +263,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/pykota.pot
===================================================================
--- pykota/trunk/po/pykota.pot (revision 2228)
+++ pykota/trunk/po/pykota.pot (revision 2266)
@@ -202,4 +202,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -223,4 +225,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/nb_NO/pykota.po
===================================================================
--- pykota/trunk/po/nb_NO/pykota.po (revision 2228)
+++ pykota/trunk/po/nb_NO/pykota.po (revision 2266)
@@ -254,4 +254,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -275,4 +277,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/th/pykota.po
===================================================================
--- pykota/trunk/po/th/pykota.po (revision 2228)
+++ pykota/trunk/po/th/pykota.po (revision 2266)
@@ -201,4 +201,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -222,4 +224,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/zh_TW/pykota.po
===================================================================
--- pykota/trunk/po/zh_TW/pykota.po (revision 2226)
+++ pykota/trunk/po/zh_TW/pykota.po (revision 2266)
@@ -203,4 +203,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -224,4 +226,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/po/it/pykota.po
===================================================================
--- pykota/trunk/po/it/pykota.po (revision 2228)
+++ pykota/trunk/po/it/pykota.po (revision 2266)
@@ -202,4 +202,6 @@
 "         hostname       Client's hostname\n"
 "         billingcode    Job's billing code\n"
+"         start          Job's date of printing\n"
+"         end            Job's date of printing\n"
 "         \n"
 "  Contrary to other PyKota management tools, wildcard characters are not \n"
@@ -223,4 +225,9 @@
 "  \n"
 "  Dumps the job history for user jerome on printer HP2100 only.\n"
+"  \n"
+"  $ dumpykota --data history start=200503 end=20050730234615\n"
+"  \n"
+"  Dumps all jobs printed between March 1st 2005 at midnight and\n"
+"  July 30th 2005 at 23 hours 46 minutes and 15 secondes included.\n"
 "  \n"
 "This program is free software; you can redistribute it and/or modify\n"
Index: pykota/trunk/TODO
===================================================================
--- pykota/trunk/TODO (revision 2264)
+++ pykota/trunk/TODO (revision 2266)
@@ -26,11 +26,4 @@
           Winboxes it seems)
 
-        - Add date filtering options to dumpykota, something like 
-                date=+20050101 date=-20050201
-          to dump all jobs printed between January 1st 2005 included      
-          and February 1st 2005 not included. This looks ugly but
-          at least we avoid the problematic '<' and '>' on command
-          lines, which would mandate the use of quotes...
-        
         - Pass-through mode for printers : history correctly filled (including
           job size) but no impact on user's page counter or account
Index: pykota/trunk/pykota/dumper.py
===================================================================
--- pykota/trunk/pykota/dumper.py (revision 2264)
+++ pykota/trunk/pykota/dumper.py (revision 2266)
@@ -65,4 +65,6 @@
                         "hostname",
                         "billingcode",
+                        "start",
+                        "end",
                       ]
     def main(self, arguments, options, restricted=1) :
Index: pykota/trunk/pykota/storages/sql.py
===================================================================
--- pykota/trunk/pykota/storages/sql.py (revision 2222)
+++ pykota/trunk/pykota/storages/sql.py (revision 2266)
@@ -124,10 +124,20 @@
     def extractHistory(self, extractonly={}) :
         """Extracts all jobhistory records."""
+        startdate = extractonly.get("start")
+        enddate = extractonly.get("end")
+        for limit in ("start", "end") :
+            try :
+                del extractonly[limit]
+            except KeyError :    
+                pass
         thefilter = self.createFilter(extractonly)
         if thefilter :
             thefilter = "AND %s" % thefilter
+        (startdate, enddate) = self.cleanDates(startdate, enddate)
+        if startdate and enddate : 
+            thefilter = "%s AND jobdate>=%s AND jobdate<=%s" % (thefilter, self.doQuote(startdate), self.doQuote(enddate))
         result = self.doRawSearch("SELECT users.username,printers.printername,jobhistory.* FROM users,printers,jobhistory WHERE users.id=jobhistory.userid AND printers.id=jobhistory.printerid %s ORDER BY jobhistory.id ASC" % thefilter)
         return self.prepareRawResult(result)
-        
+            
     def getAllUsersNames(self) :    
         """Extracts all user names."""
@@ -498,6 +508,6 @@
         self.doModify("DELETE FROM printergroupsmembers WHERE groupid=%s AND printerid=%s" % (self.doQuote(pgroup.ident), self.doQuote(printer.ident)))
         
-    def retrieveHistory(self, user=None, printer=None, datelimit=None, hostname=None, billingcode=None, limit=100) :
-        """Retrieves all print jobs for user on printer (or all) before date, limited to first 100 results."""
+    def retrieveHistory(self, user=None, printer=None, hostname=None, billingcode=None, limit=100, start=None, end=None) :
+        """Retrieves all print jobs for user on printer (or all) between start and end date, limited to first 100 results."""
         query = "SELECT jobhistory.*,username,printername FROM jobhistory,users,printers WHERE users.id=userid AND printers.id=printerid"
         where = []
@@ -510,6 +520,8 @@
         if billingcode is not None :    
             where.append("billingcode=%s" % self.doQuote(self.userCharsetToDatabase(billingcode)))
-        if datelimit is not None :    
-            where.append("jobdate<=%s" % self.doQuote(datelimit))
+        if start is not None :    
+            where.append("jobdate>=%s" % self.doQuote(start))
+        if end is not None :    
+            where.append("jobdate<=%s" % self.doQuote(end))
         if where :    
             query += " AND %s" % " AND ".join(where)
Index: pykota/trunk/pykota/storages/ldapstorage.py
===================================================================
--- pykota/trunk/pykota/storages/ldapstorage.py (revision 2222)
+++ pykota/trunk/pykota/storages/ldapstorage.py (revision 2266)
@@ -1044,6 +1044,6 @@
             self.doModify(pgroup.ident, fields)         
             
-    def retrieveHistory(self, user=None, printer=None, datelimit=None, hostname=None, billingcode=None, limit=100) :
-        """Retrieves all print jobs for user on printer (or all) before date, limited to first 100 results."""
+    def retrieveHistory(self, user=None, printer=None, hostname=None, billingcode=None, limit=100, start=None, end=None) :
+        """Retrieves all print jobs for user on printer (or all) between start and end date, limited to first 100 results."""
         precond = "(objectClass=pykotaJob)"
         where = []
@@ -1110,6 +1110,9 @@
                 minute = int(date[10:12])
                 second = int(date[12:14])
-                job.JobDate = "%04i-%02i-%02i %02i:%02i:%02i" % (year, month, day, hour, minute, second)
-                if (datelimit is None) or (job.JobDate <= datelimit) :
+                job.JobDate = "%04i%02i%02i %02i:%02i:%02i" % (year, month, day, hour, minute, second)
+                if ((start is None) and (end is None)) or \
+                   ((start is None) and (job.JobDate <= end)) or \
+                   ((end is None) and (job.JobDate >= start)) or \
+                   ((job.JobDate >= start) and (job.JobDate <= end)) :
                     job.UserName = fields.get("pykotaUserName")[0]
                     job.PrinterName = fields.get("pykotaPrinterName")[0]
@@ -1335,5 +1338,13 @@
         else :    
             printer = None
-        entries = self.retrieveHistory(user, printer, hostname=extractonly.get("hostname"), billingcode=extractonly.get("billingcode"), limit=None)
+        startdate = extractonly.get("start")
+        enddate = extractonly.get("end")
+        for limit in ("start", "end") :
+            try :
+                del extractonly[limit]
+            except KeyError :    
+                pass
+        (startdate, enddate) = self.cleanDates(startdate, enddate)
+        entries = self.retrieveHistory(user, printer, hostname=extractonly.get("hostname"), billingcode=extractonly.get("billingcode"), limit=None, start=startdate, end=enddate)
         if entries :
             result = [ ("username", "printername", "dn", "jobid", "pagecounter", "jobsize", "action", "jobdate", "filename", "title", "copies", "options", "jobprice", "hostname", "jobsizebytes", "md5sum", "pages", "billingcode") ] 
Index: pykota/trunk/pykota/storage.py
===================================================================
--- pykota/trunk/pykota/storage.py (revision 2217)
+++ pykota/trunk/pykota/storage.py (revision 2266)
@@ -23,4 +23,6 @@
 #
 
+from mx import DateTime
+
 class PyKotaStorageError(Exception):
     """An exception for Quota Storage related stuff."""
@@ -588,4 +590,59 @@
         return text
         
+    def cleanDates(self, startdate, enddate) :    
+        """Clean the dates to create a correct filter."""
+        if startdate is None :
+            startdate = enddate
+        if enddate is None :    
+            enddate = startdate
+        if (startdate is None) and (enddate is None) :    
+            return (None, None)
+        if startdate.isdigit() and enddate.isdigit() :
+            datedict = { "start" : startdate, "end" : enddate }    
+            for limit in datedict.keys() :
+                dateval = datedict[limit]
+                lgdateval = len(dateval)
+                if lgdateval == 4 :
+                    if limit == "start" : 
+                        dateval = "%s0101 00:00:00" % dateval
+                    else :  
+                        dateval = "%s1231 23:59:59" % dateval
+                elif lgdateval == 6 :
+                    if limit == "start" : 
+                        dateval = "%s01 00:00:00" % dateval
+                    else :  
+                        mxdate = DateTime.ISO.ParseDateTime("%s01 00:00:00" % dateval)
+                        dateval = "%s%02i 23:59:59" % (dateval, mxdate.days_in_month)
+                elif lgdateval == 8 :
+                    if limit == "start" : 
+                        dateval = "%s 00:00:00" % dateval
+                    else :  
+                        dateval = "%s 23:59:59" % dateval
+                elif lgdateval == 10 :
+                    if limit == "start" : 
+                        dateval = "%s %s:00:00" % (dateval[:8], dateval[8:])
+                    else :  
+                        dateval = "%s %s:59:59" % (dateval[:8], dateval[8:])
+                elif lgdateval == 12 :
+                    if limit == "start" : 
+                        dateval = "%s %s:%s:00" % (dateval[:8], dateval[8:10], dateval[10:])
+                    else :  
+                        dateval = "%s %s:%s:59" % (dateval[:8], dateval[8:10], dateval[10:])
+                elif lgdateval == 14 :        
+                    dateval = "%s %s:%s:%s" % (dateval[:8], dateval[8:10], dateval[10:12], dateval[12:])
+                else :    
+                    dateval = None
+                try :    
+                    DateTime.ISO.ParseDateTime(dateval)
+                except :    
+                    dateval = None
+                datedict[limit] = dateval    
+            (start, end) = (datedict["start"], datedict["end"])
+            if start > end :
+                (start, end) = (end, start)
+            return (start, end)    
+        else :            
+            return (None, None)
+        
 def openConnection(pykotatool) :
     """Returns a connection handle to the appropriate Quota Storage Database."""
Index: pykota/trunk/pykota/version.py
===================================================================
--- pykota/trunk/pykota/version.py (revision 2262)
+++ pykota/trunk/pykota/version.py (revision 2266)
@@ -22,5 +22,5 @@
 #
 
-__version__ = "1.23alpha3_unofficial"
+__version__ = "1.23alpha4_unofficial"
 
 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""
Index: pykota/trunk/cgi-bin/printquota.cgi
===================================================================
--- pykota/trunk/cgi-bin/printquota.cgi (revision 2265)
+++ pykota/trunk/cgi-bin/printquota.cgi (revision 2266)
@@ -29,4 +29,6 @@
 import cgi
 import urllib
+
+from mx import DateTime
 
 from pykota import version
@@ -203,5 +205,5 @@
                     billingcode = None
                 self.report = ["<h2>%s</h2>" % _("History")]    
-                history = self.storage.retrieveHistory(user, printer, datelimit, hostname, billingcode)
+                history = self.storage.retrieveHistory(user, printer, hostname, billingcode, end=datelimit)
                 if not history :
                     self.report.append("<h3>%s</h3>" % _("Empty"))
@@ -257,6 +259,7 @@
                                                             job.JobPages)])))
                     self.report.append('</table>')
+                    d = DateTime.ISO.ParseDateTime(job.JobDate)       
                     dico = { "history" : 1,
-                             "datelimit" : job.JobDate,
+                             "datelimit" : "%04i%02i%02i %02i:%02i:%02i" % (d.year, d.month, d.day, d.hour, d.minute, d.second),
                            }
                     if user and user.Exists :
