Skip to content

Commit

Permalink
Merge branch 'heiglandreas-correctDateRanges'
Browse files Browse the repository at this point in the history
  • Loading branch information
akrabat committed Mar 11, 2015
2 parents 65b53de + 1ca25f2 commit 0b7f823
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"symfony/validator": "~2.5",
"symfony/security-csrf": "~2.5",
"symfony/twig-bridge": "~2.5",
"org_heigl/daterange": "~1.0"
"org_heigl/daterange": "~1.1"
}
}
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInit8cd3c037b9132e676e3f72dd0f6eb4e1::getLoader();
return ComposerAutoloaderInitea939503be411f5478ca4976fabdaa0c::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit8cd3c037b9132e676e3f72dd0f6eb4e1
class ComposerAutoloaderInitea939503be411f5478ca4976fabdaa0c
{
private static $loader;

Expand All @@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit8cd3c037b9132e676e3f72dd0f6eb4e1', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitea939503be411f5478ca4976fabdaa0c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit8cd3c037b9132e676e3f72dd0f6eb4e1', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitea939503be411f5478ca4976fabdaa0c', 'loadClassLoader'));

$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
Expand All @@ -42,14 +42,14 @@ public static function getLoader()

$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
composerRequire8cd3c037b9132e676e3f72dd0f6eb4e1($file);
composerRequireea939503be411f5478ca4976fabdaa0c($file);
}

return $loader;
}
}

function composerRequire8cd3c037b9132e676e3f72dd0f6eb4e1($file)
function composerRequireea939503be411f5478ca4976fabdaa0c($file)
{
require $file;
}
12 changes: 6 additions & 6 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -860,17 +860,17 @@
},
{
"name": "org_heigl/daterange",
"version": "1.0.0",
"version_normalized": "1.0.0.0",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/heiglandreas/org.heigl.daterange.git",
"reference": "3f6a4b70834a52c7a66906b1e54d09d6d85fdfff"
"reference": "0e91a092bb8d63b715497796d719b876372050c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/heiglandreas/org.heigl.daterange/zipball/3f6a4b70834a52c7a66906b1e54d09d6d85fdfff",
"reference": "3f6a4b70834a52c7a66906b1e54d09d6d85fdfff",
"url": "https://api.github.com/repos/heiglandreas/org.heigl.daterange/zipball/0e91a092bb8d63b715497796d719b876372050c5",
"reference": "0e91a092bb8d63b715497796d719b876372050c5",
"shasum": ""
},
"require": {
Expand All @@ -882,7 +882,7 @@
"phpunit/phpunit": "~4.7@dev",
"squizlabs/php_codesniffer": "~2.0@dev"
},
"time": "2015-03-03 07:31:14",
"time": "2015-03-08 21:09:01",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions vendor/org_heigl/daterange/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ matrix:
fast_finish : true
allow_failures:
- php: 7.0
- php: hhvm-nightly

after_script:
- ./.travis.after.sh
11 changes: 5 additions & 6 deletions vendor/org_heigl/daterange/src/DateRangeFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,15 @@ protected function splitFormat($diffPoint)
public function getDateRange(DateTimeInterface $start, DateTimeInterface $end)
{
$arrays = $this->splitFormat($this->getDiffPoint($start, $end));

if (! $arrays[1]) {
return $start->format($arrays[0]);
}
$string = '';
$string .= $start->format($arrays[0]);
$string .= $this->combine;
$string .= $end->format($arrays[0]);

if ($arrays[1]) {
$string .= $end->format($arrays[1]);
}

$string .= $end->format($arrays[1]);

return $string;
}
}
3 changes: 2 additions & 1 deletion vendor/org_heigl/daterange/tests/DateRangeFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function testSettingTestableParts($format, $expected)
$formatter = new DateRangeFormatter();
$formatter->setFormat($format);

$sweetsThief = function(DateRangeFormatter $formatter) {
$sweetsThief = function (DateRangeFormatter $formatter) {
return $formatter->testableParts;
};

Expand Down Expand Up @@ -170,6 +170,7 @@ public function gettingDateDiffProvider()
return array(
array('d.m.Y', '12.2.2014', '13.2.2014', '12. - 13.02.2014'),
array('m/d/Y', '12.2.2014', '13.2.2014', '02/12/ - 02/13/2014'),
array('d.m.Y', '12.2.2014', '12.2.2014', '12.02.2014'),
);
}

Expand Down

0 comments on commit 0b7f823

Please sign in to comment.