diff options
author | Thomas Citharel <tcit@tcit.fr> | 2014-12-19 21:08:44 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2014-12-19 21:08:44 +0100 |
commit | 3dcd85c075998ecdf2d54c5661c42e24080067d5 (patch) | |
tree | b939cdbf86c1be64ef64d8afb3efd0d55e8a945e /inc/3rdparty/libraries/MOBIClass/FileDate.php | |
parent | 44b95cb81deae35f58e0058910afde2f2ffb9a60 (diff) | |
parent | e9a64ef8a9776becbe4c621ee4bd762f24b1bc3e (diff) | |
download | wallabag-3dcd85c075998ecdf2d54c5661c42e24080067d5.tar.gz wallabag-3dcd85c075998ecdf2d54c5661c42e24080067d5.tar.zst wallabag-3dcd85c075998ecdf2d54c5661c42e24080067d5.zip |
merge
Diffstat (limited to 'inc/3rdparty/libraries/MOBIClass/FileDate.php')
-rw-r--r-- | inc/3rdparty/libraries/MOBIClass/FileDate.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/inc/3rdparty/libraries/MOBIClass/FileDate.php b/inc/3rdparty/libraries/MOBIClass/FileDate.php new file mode 100644 index 00000000..2284eba2 --- /dev/null +++ b/inc/3rdparty/libraries/MOBIClass/FileDate.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * Description of FileDate | ||
5 | * | ||
6 | * @author Sander | ||
7 | */ | ||
8 | class FileDate extends FileObject { | ||
9 | private $data; | ||
10 | |||
11 | /** | ||
12 | * Make an integer to be stored in a file | ||
13 | * @param int $n | ||
14 | */ | ||
15 | public function __construct($n = 0){ | ||
16 | parent::__construct(4); | ||
17 | $this->set($n); | ||
18 | } | ||
19 | |||
20 | public function get(){ | ||
21 | return $this->data; | ||
22 | } | ||
23 | |||
24 | public function set($value){ | ||
25 | $this->data = intval($value); | ||
26 | } | ||
27 | |||
28 | public function serialize() { | ||
29 | return $this->intToString($this->data); | ||
30 | } | ||
31 | |||
32 | public function unserialize($data) { | ||
33 | __construct($this->toInt($data)); | ||
34 | } | ||
35 | |||
36 | public function __toString(){ | ||
37 | return "FileDate: {".(date("r", $this->data-94694400))."}"; | ||
38 | } | ||
39 | } | ||
40 | ?> | ||