"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/twig/twig/src/Extension/CoreExtension.php" between
phplist-3.4.9.tgz and phplist-3.5.0.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

CoreExtension.php  (phplist-3.4.9.tgz):CoreExtension.php  (phplist-3.5.0.tgz)
skipping to change at line 493 skipping to change at line 493
/** /**
* Converts an input to a \DateTime instance. * Converts an input to a \DateTime instance.
* *
* {% if date(user.created_at) < date('+2days') %} * {% if date(user.created_at) < date('+2days') %}
* {# do something #} * {# do something #}
* {% endif %} * {% endif %}
* *
* @param \DateTimeInterface|string|null $date A date or null to use the cu rrent time * @param \DateTimeInterface|string|null $date A date or null to use the cu rrent time
* @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
* *
* @return \DateTime * @return \DateTimeInterface
*/ */
function twig_date_converter(Environment $env, $date = null, $timezone = null) function twig_date_converter(Environment $env, $date = null, $timezone = null)
{ {
// determine the timezone // determine the timezone
if (false !== $timezone) { if (false !== $timezone) {
if (null === $timezone) { if (null === $timezone) {
$timezone = $env->getExtension(CoreExtension::class)->getTimezone(); $timezone = $env->getExtension(CoreExtension::class)->getTimezone();
} elseif (!$timezone instanceof \DateTimeZone) { } elseif (!$timezone instanceof \DateTimeZone) {
$timezone = new \DateTimeZone($timezone); $timezone = new \DateTimeZone($timezone);
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)