diff options
Diffstat (limited to 'app/models/Entry.php')
| -rwxr-xr-x | app/models/Entry.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php index c5ff6ab60..636e67e75 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -57,6 +57,14 @@ class Entry extends Model { return timestamptodate ($this->date); } } + public function dateAdded ($raw = false) { + $date = intval(substr($this->id, 0, -6)); + if ($raw) { + return $date; + } else { + return timestamptodate ($date); + } + } public function isRead () { return $this->is_read; } |
