Permalink
Browse files

Fixing wrong date format being returned for additional date formats

  • Loading branch information...
1 parent 8dd85f2 commit a3f45a6ed1ac1fdd25e42c83014e064c73004788 Cameron Dutro committed Dec 6, 2012
View
@@ -1,3 +1,7 @@
+== 2.0.1
+
+* Fixed bug for additional date formats that was causing the wrong format to be returned.
+
== 2.0.0
* Added locales ga, ta, gl, cy, sr, bg, ku, ro, lv, be, sq, sk, and bn.
@@ -59,8 +59,12 @@ def position_score(entities, goal_entities)
end
def exist_score(entities, goal_entities)
- goal_entities.count do |goal_entity|
- !entities.any? { |entity| entity[0] == goal_entity[0] }
+ goal_entities.inject(0) do |sum, goal_entity|
+ if !entities.any? { |entity| entity[0] == goal_entity[0] }
+ sum + 1
+ else
+ sum
+ end
end
end
@@ -4,5 +4,5 @@
# http://www.apache.org/licenses/LICENSE-2.0
module TwitterCldr
- VERSION = "2.0.0"
+ VERSION = "2.0.1"
end

0 comments on commit a3f45a6

Please sign in to comment.