fuzzy-date 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fuzzy-date.rb +3 -76
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4b775858eb61b4d03ab7006f13a279d3be9732f
4
- data.tar.gz: a4bfd9ea64ccbd930729e1bce1fac563a485bc85
3
+ metadata.gz: d1f0d1b0e41ae1637b944efb8170a9e6c6ab7fdb
4
+ data.tar.gz: e644b3e39b3840d789f1649faecbdde72cf019b0
5
5
  SHA512:
6
- metadata.gz: d4802c6c67c784947388194aca1575a873a0d27693c27a63b325da20b0e975be7e0bb110508e73a51a5f1efaedb8f31d1f0ae8815290322a6df04b66ddd770a2
7
- data.tar.gz: b809b0de412a01fd2d191e68083c004b1838d972a379e8e4dac6cdca785f367a8dac7ec3066ba175954626f4cf938d6777480935f374a1eb0bf41c714e5fa75f
6
+ metadata.gz: f2dd3f91af0b73c47d7187b26ff5ebf1f3d34d3609a1cf1f06772bfd5894c5da250fc08609ad943230da40129fecca220278f808ede8d2bf99839243288fa359
7
+ data.tar.gz: 0dc5789dc10626d75b992945066642ce2116a133dfbcec9eabf94db5df1f5700b5b2883d83026b52a7bdc0c034179c797e94f2692e364254eae86cdffe510801
@@ -1,82 +1,9 @@
1
1
  require 'date'
2
2
 
3
+ require 'fuzzy-date/variables'
4
+
3
5
  module FuzzyDate
4
- VERSION = '0.1.2'
5
-
6
- DATE_SEPARATOR = '[^A-Za-z0-9]'
7
-
8
- @month_names = {
9
- 1 => 'January',
10
- 2 => 'February',
11
- 3 => 'March',
12
- 4 => 'April',
13
- 5 => 'May',
14
- 6 => 'June',
15
- 7 => 'July',
16
- 8 => 'August',
17
- 9 => 'September',
18
- 10 => 'October',
19
- 11 => 'November',
20
- 12 => 'December'
21
- }
22
-
23
- @month_abbreviations = {
24
- 'Jan' => 'January',
25
- 'Feb' => 'February',
26
- 'Mar' => 'March',
27
- 'Apr' => 'April',
28
- 'May' => 'May',
29
- 'Jun' => 'June',
30
- 'Jul' => 'July',
31
- 'Aug' => 'August',
32
- 'Sep' => 'September',
33
- 'Oct' => 'October',
34
- 'Nov' => 'November',
35
- 'Dec' => 'December'
36
- }
37
-
38
- @days_in_month = {
39
- 1 => 31,
40
- 2 => 28,
41
- 3 => 31,
42
- 4 => 30,
43
- 5 => 31,
44
- 6 => 30,
45
- 7 => 31,
46
- 8 => 31,
47
- 9 => 30,
48
- 10 => 31,
49
- 11 => 30,
50
- 12 => 31
51
- }
52
-
53
- @range_words = [
54
- 'Between',
55
- 'Bet',
56
- 'Bet.',
57
- 'From'
58
- ]
59
-
60
- @middle_range_words = [
61
- # '-', - Not used because it is more commonly used as a delimiter
62
- 'To',
63
- 'And'
64
- ]
65
-
66
- @circa_words = [
67
- 'Circa',
68
- 'About',
69
- 'Abt',
70
- 'Abt.',
71
- '~'
72
- ]
73
-
74
- @era_words = [
75
- 'AD',
76
- 'BC',
77
- 'CE',
78
- 'BCE'
79
- ]
6
+ VERSION = '0.1.3'
80
7
 
81
8
  # *Note*: This is only for single dates - not ranges.
82
9
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuzzy-date
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cole
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-12 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The fuzzy-date gem provides a way to parse and use incomplete dates,
14
14
  like those found in history or genealogy.