Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DateTimeFormatter): Adjust invalid doc blocks #44663

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions lib/private/DateTimeFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,13 @@ public function formatDateRelativeDay($timestamp, $format = 'long', ?\DateTimeZo
* Gives the relative date of the timestamp
* Only works for past dates
*
* @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
* @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
* @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
* @return string Dates returned are:
* @param \OCP\IL10N $l The locale to use
* @return string Formatted date span. Dates returned are:
* < 1 month => Today, Yesterday, n days ago
* < 13 month => last month, n months ago
* >= 13 month => last year, n years ago
* @param \OCP\IL10N $l The locale to use
* @return string Formatted date span
*/
public function formatDateSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null) {
$l = $this->getLocale($l);
Expand Down Expand Up @@ -220,15 +219,14 @@ public function formatTime($timestamp, $format = 'medium', ?\DateTimeZone $timeZ
*
* @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
* @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
* @return string Dates returned are:
* @param \OCP\IL10N $l The locale to use
* @return string Formatted time span. Dates returned are:
* < 60 sec => seconds ago
* < 1 hour => n minutes ago
* < 1 day => n hours ago
* < 1 month => Yesterday, n days ago
* < 13 month => last month, n months ago
* >= 13 month => last year, n years ago
* @param \OCP\IL10N $l The locale to use
* @return string Formatted time span
*/
public function formatTimeSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null) {
$l = $this->getLocale($l);
Expand Down
Loading