From 490c5094f56b73f56981c59d402a083229d0d5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Fri, 19 Aug 2016 18:50:50 +0200 Subject: [PATCH] [ElsevierBridge] fix time extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/ElsevierBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/ElsevierBridge.php b/bridges/ElsevierBridge.php index ebee2a26..4b039df5 100644 --- a/bridges/ElsevierBridge.php +++ b/bridges/ElsevierBridge.php @@ -41,10 +41,10 @@ class ElsevierBridge extends BridgeAbstract{ */ if(preg_match('/\S*(\d+\s\S+\s\d{4})/ims', $timestring, $matches)){ return strtotime($matches[0]); - } elseif (preg_match('/([A-Za-z]+\s\d{4})/ims', $timestring, $matches)){ - return strtotime($matches[0]); } elseif (preg_match('/[A-Za-z]+\-([A-Za-z]+\s\d{4})/ims', $timestring, $matches)){ return strtotime($matches[0]); + } elseif (preg_match('/([A-Za-z]+\s\d{4})/ims', $timestring, $matches)){ + return strtotime($matches[0]); } else { return 0; }