Permalink
Browse files

trim the whitespace

  • Loading branch information...
1 parent cf84396 commit 3366b9aa8653e6013d673c5bcdedaa27acda01f3 @nicholas-eden committed Sep 7, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Carbon/Carbon.php
View
@@ -732,12 +732,13 @@ public static function hasTestNow()
/**
* Determine if there is a relative keyword in the time string, this is to
* create dates relative to now for test instances. e.g.: next tuesday
+ * TODO: add support for 'ago' which would typically be at the end of a phrase
*
* @return boolean true if there is a keyword, otherwise false
*/
public static function hasRelativeKeywords($time) {
foreach(self::$relativeKeywords as $keyword) {
- if (stripos($time, $keyword) === 0) {
+ if (stripos(trim($time), $keyword) === 0) {
return true;
}
}

0 comments on commit 3366b9a

Please sign in to comment.