This adds the function getPubDate() to book.php, which
returns either the publication year, or "", if the value is null or "Undefined". By "Undefined", I mean the value Calibre sets as pubdate when you choose "Undefined" in the GUI. which is 1 Jan 0100, or -58979926800.
Šis iesūtījums ir iekļauts:
vecāks
977e669805
iesūtījums
46c0de5c66
3 izmainītas datnes ar 29 papildinājumiem un 1 izdzēšanām
9
book.php
9
book.php
|
|
@ -245,6 +245,15 @@ class Book extends Base {
|
|||
}
|
||||
return $retour;
|
||||
}
|
||||
|
||||
public function getPubDate () {
|
||||
if (is_null ($this->pubdate) || ($this->pubdate <= -58979926800)) {
|
||||
return "";
|
||||
}
|
||||
else {
|
||||
return date ("Y", $this->pubdate);
|
||||
}
|
||||
}
|
||||
|
||||
public function getComment ($withSerie = true) {
|
||||
$addition = "";
|
||||
|
|
|
|||
Notiek ielāde…
Pievienot tabulu
Pievienot saiti
Atsaukties jaunā pieteikumā