aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DateTimeFormatter.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 10:35:09 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 10:35:09 +0200
commit14c996d98256de958da367297c3313e0fa7ef9a8 (patch)
tree27074d5403b67cbaf59d7b7181481ebe70af5d9e /lib/private/DateTimeFormatter.php
parentd6e17fb01777866674129a5883c03642f4bfd4a5 (diff)
downloadnextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.tar.gz
nextcloud-server-14c996d98256de958da367297c3313e0fa7ef9a8.zip
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/DateTimeFormatter.php')
-rw-r--r--lib/private/DateTimeFormatter.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/DateTimeFormatter.php b/lib/private/DateTimeFormatter.php
index bb9e018b584..45a1cbdb8f2 100644
--- a/lib/private/DateTimeFormatter.php
+++ b/lib/private/DateTimeFormatter.php
@@ -81,7 +81,7 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
protected function getDateTime($timestamp, \DateTimeZone $timeZone = null) {
if ($timestamp === null) {
return new \DateTime('now', $timeZone);
- } else if (!$timestamp instanceof \DateTime) {
+ } elseif (!$timestamp instanceof \DateTime) {
$dateTime = new \DateTime('now', $timeZone);
$dateTime->setTimestamp($timestamp);
return $dateTime;
@@ -160,31 +160,31 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
if ($dateInterval->y == 0 && $dateInterval->m == 0 && $dateInterval->d == 0) {
return $l->t('today');
- } else if ($dateInterval->y == 0 && $dateInterval->m == 0 && $dateInterval->d == 1) {
+ } elseif ($dateInterval->y == 0 && $dateInterval->m == 0 && $dateInterval->d == 1) {
if ($timestamp > $baseTimestamp) {
return $l->t('tomorrow');
} else {
return $l->t('yesterday');
}
- } else if ($dateInterval->y == 0 && $dateInterval->m == 0) {
+ } elseif ($dateInterval->y == 0 && $dateInterval->m == 0) {
if ($timestamp > $baseTimestamp) {
return $l->n('in %n day', 'in %n days', $dateInterval->d);
} else {
return $l->n('%n day ago', '%n days ago', $dateInterval->d);
}
- } else if ($dateInterval->y == 0 && $dateInterval->m == 1) {
+ } elseif ($dateInterval->y == 0 && $dateInterval->m == 1) {
if ($timestamp > $baseTimestamp) {
return $l->t('next month');
} else {
return $l->t('last month');
}
- } else if ($dateInterval->y == 0) {
+ } elseif ($dateInterval->y == 0) {
if ($timestamp > $baseTimestamp) {
return $l->n('in %n month', 'in %n months', $dateInterval->m);
} else {
return $l->n('%n month ago', '%n months ago', $dateInterval->m);
}
- } else if ($dateInterval->y == 1) {
+ } elseif ($dateInterval->y == 1) {
if ($timestamp > $baseTimestamp) {
return $l->t('next year');
} else {
@@ -250,7 +250,7 @@ class DateTimeFormatter implements \OCP\IDateTimeFormatter {
} else {
return $l->n('%n hour ago', '%n hours ago', $diff->h);
}
- } else if ($diff->i > 0) {
+ } elseif ($diff->i > 0) {
if ($timestamp > $baseTimestamp) {
return $l->n('in %n minute', 'in %n minutes', $diff->i);
} else {