Closed carolineboeykens closed 4 years ago
Error in vendor/studioespresso/craft-date-range/src/fields/data/DateRangeData.php line 67
if ($this->start->format('dmy') === $this->end->format('dmy') && isset($timeFormat)) { $string .= $formatter->asDate($this->start, "php:$dateFormat"); $string .= " "; $string .= $formatter->asTime($this->start, "php:$timeFormat"); $string .= " " . trim($seperator) . " "; $string .= $formatter->asTime($this->end, "php:$timeFormat"); } else { $string .= $formatter->asDate($this->start, "php:$dateFormat"); $string .= " " . trim($seperator) . " "; $string .= $formatter->asDate($this->start, "php:$dateFormat"); }
if ($this->start->format('dmy') === $this->end->format('dmy') && isset($timeFormat)) {
$string .= $formatter->asDate($this->start, "php:$dateFormat");
$string .= " ";
$string .= $formatter->asTime($this->start, "php:$timeFormat");
$string .= " " . trim($seperator) . " ";
$string .= $formatter->asTime($this->end, "php:$timeFormat");
} else {
}
$dateFormat should be $format and on the last line: $this->start should be $this->end
if ($this->start->format('dmy') === $this->end->format('dmy') && isset($timeFormat)) { $string .= $formatter->asDate($this->start, "php:$format"); $string .= " "; $string .= $formatter->asTime($this->start, "php:$format"); $string .= " " . trim($seperator) . " "; $string .= $formatter->asTime($this->end, "php:$format"); } else { $string .= $formatter->asDate($this->start, "php:$format"); $string .= " " . trim($seperator) . " "; $string .= $formatter->asDate($this->end, "php:$format"); }
$string .= $formatter->asDate($this->start, "php:$format");
$string .= $formatter->asTime($this->start, "php:$format");
$string .= $formatter->asTime($this->end, "php:$format");
$string .= $formatter->asDate($this->end, "php:$format");
Fixed in 2.1.2!
Error in vendor/studioespresso/craft-date-range/src/fields/data/DateRangeData.php line 67
if ($this->start->format('dmy') === $this->end->format('dmy') && isset($timeFormat)) {
$string .= $formatter->asDate($this->start, "php:$dateFormat");
$string .= " ";
$string .= $formatter->asTime($this->start, "php:$timeFormat");
$string .= " " . trim($seperator) . " ";
$string .= $formatter->asTime($this->end, "php:$timeFormat");
} else {
$string .= $formatter->asDate($this->start, "php:$dateFormat");
$string .= " " . trim($seperator) . " ";
$string .= $formatter->asDate($this->start, "php:$dateFormat");
}
$dateFormat should be $format and on the last line: $this->start should be $this->end
if ($this->start->format('dmy') === $this->end->format('dmy') && isset($timeFormat)) {
$string .= $formatter->asDate($this->start, "php:$format");
$string .= " ";
$string .= $formatter->asTime($this->start, "php:$format");
$string .= " " . trim($seperator) . " ";
$string .= $formatter->asTime($this->end, "php:$format");
} else {
$string .= $formatter->asDate($this->start, "php:$format");
$string .= " " . trim($seperator) . " ";
$string .= $formatter->asDate($this->end, "php:$format");
}