Skip to content

Commit

Permalink
fix: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Dec 27, 2023
1 parent 8fdc5a7 commit c801aa1
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions HumanDates.php
Expand Up @@ -97,36 +97,6 @@ function range($from, $to, array $patterns = []): string
return implode($pattern[1], $pieces);
}

// /**
// * Format a daterange as human readable date string
// */
// function range($from, $to, $patterns = null): string
// {
// $from = $this->timestamp($from);
// $to = $this->timestamp($to);
// $this->setPatterns($patterns);

// if (date("Ymd", $from) === date("Ymd", $to)) $pattern = 'sameDay';
// elseif (date("Ym", $from) === date("Ym", $to)) $pattern = 'sameMonth';
// elseif (date("Y", $from) === date("Y", $to)) $pattern = 'sameYear';
// else $pattern = 'default';

// $pattern = $this->patterns[$pattern];
// if (count($pattern) == 3) {
// $pieces = array_filter([
// $this->getString($from, $pattern[0]),
// $this->getString($to, $pattern[2]),
// ]);
// $range = implode($pattern[1], $pieces);
// } else {
// $range = $this->getString($from, $pattern[0]);
// }

// $this->patterns = self::rangePatterns;

// return $range;
// }

/**
* Set default date format pattern
*/
Expand Down

0 comments on commit c801aa1

Please sign in to comment.