Remove product literal strings in "pht()", part 18
[phabricator.git] / src / applications / calendar / notifications / PhabricatorCalendarEventNotificationView.php
blob8c619c7fb21be5492dd78f493f9677525608c8a9
1 <?php
3 final class PhabricatorCalendarEventNotificationView
4 extends Phobject {
6 private $viewer;
7 private $event;
8 private $epoch;
9 private $dateTime;
11 public function setViewer(PhabricatorUser $viewer) {
12 $this->viewer = $viewer;
13 return $this;
16 public function getViewer() {
17 return $this->viewer;
20 public function setEvent(PhabricatorCalendarEvent $event) {
21 $this->event = $event;
22 return $this;
25 public function getEvent() {
26 return $this->event;
29 public function setEpoch($epoch) {
30 $this->epoch = $epoch;
31 return $this;
34 public function getEpoch() {
35 return $this->epoch;
38 public function setDateTime(PhutilCalendarDateTime $date_time) {
39 $this->dateTime = $date_time;
40 return $this;
43 public function getDateTime() {
44 return $this->dateTime;
47 public function getDisplayMinutes() {
48 $epoch = $this->getEpoch();
49 $now = PhabricatorTime::getNow();
50 $minutes = (int)ceil(($epoch - $now) / 60);
51 return new PhutilNumber($minutes);
54 public function getDisplayTime() {
55 $viewer = $this->getViewer();
57 $epoch = $this->getEpoch();
58 return phabricator_datetime($epoch, $viewer);
61 public function getDisplayTimeWithTimezone() {
62 $viewer = $this->getViewer();
64 $epoch = $this->getEpoch();
65 return phabricator_datetimezone($epoch, $viewer);