edtf 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,41 +0,0 @@
1
- Feature: EDTF parses date/time strings
2
-
3
- As a user of edtf-ruby
4
- I want to parse date/time strings formatted in EDTF
5
-
6
- Scenario Outline: EDTF parses a date/time string
7
- When I parse the string "<string>"
8
- Then the year should be "<year>"
9
- And the month should be "<month>"
10
- And the day should be "<day>"
11
- And the hours should be "<hours>"
12
- And the minutes should be "<minutes>"
13
- And the seconds should be "<seconds>"
14
-
15
- @002 @level0
16
- Scenarios: simple dates
17
- | string | year | month | day | hours | minutes | seconds |
18
- | 2001-02-03T09:30:01 | 2001 | 2 | 3 | 9 | 30 | 1 |
19
-
20
-
21
- Scenario Outline: EDTF parses a date/time string with timezone indicator
22
- When I parse the string "<string>"
23
- Then the year should be "<year>" (UTC)
24
- And the month should be "<month>" (UTC)
25
- And the day should be "<day>" (UTC)
26
- And the hours should be "<hours>" (UTC)
27
- And the minutes should be "<minutes>"
28
- And the seconds should be "<seconds>"
29
-
30
- @002 @level0
31
- Scenarios: date/times with timezone
32
- | string | year | month | day | hours | minutes | seconds |
33
- | 2004-01-01T10:10:10Z | 2004 | 1 | 1 | 10 | 10 | 10 |
34
- | 2004-01-01T10:10:10+05:00 | 2004 | 1 | 1 | 5 | 10 | 10 |
35
- | 2004-01-01T02:10:10+05:00 | 2003 | 12 | 31 | 21 | 10 | 10 |
36
-
37
- # Scenarios: fractions
38
- # | string | year | month | day | hours | minutes | seconds |
39
- # | 2004-01-01T10 | 2004 | 1 | 1 | 10 | 0 | 0 |
40
- # | 2004-01-01T10:10:10+05:00 | 2004 | 1 | 1 | 5 | 10 | 10 |
41
- # | 2004-01-01T02:10:10+05:00 | 2003 | 12 | 31 | 21 | 10 | 10 |
@@ -1,89 +0,0 @@
1
- Feature: EDTF parser parses date strings
2
-
3
- In order to use dates in EDTF
4
- As a user of edtf-ruby
5
- I want to parse date strings formatted in EDTF
6
-
7
- Scenario Outline: EDTF parses a date string
8
- When I parse the string "<string>"
9
- Then the year should be "<year>"
10
- And the month should be "<month>"
11
- And the day should be "<day>"
12
-
13
- @001 @level0
14
- Scenarios: simple dates
15
- | string | year | month | day |
16
- | 2001-02-03 | 2001 | 2 | 3 |
17
- | 2008-12 | 2008 | 12 | 1 |
18
- | 2008 | 2008 | 1 | 1 |
19
- | -0999 | -999 | 1 | 1 |
20
- | 0000 | 0 | 1 | 1 |
21
-
22
-
23
- Scenario Outline: EDTF parses uncertain date strings
24
- When I parse the string "<string>"
25
- Then the year should be "<year>"
26
- And the year should be uncertain? "<uncertain-year>"
27
- And the month should be "<month>"
28
- And the month should be uncertain? "<uncertain-month>"
29
- And the day should be "<day>"
30
- And the day should be uncertain? "<uncertain-day>"
31
-
32
- @101 @level1
33
- Scenarios: uncertain date examples from the specification
34
- | string | year | uncertain-year | month | uncertain-month | day | uncertain-day |
35
- | 1992? | 1992 | yes | 1 | no | 1 | no |
36
- | 1984? | 1984 | yes | 1 | no | 1 | no |
37
- | 2004-06? | 2004 | yes | 6 | yes | 1 | no |
38
- | 2004-06-11? | 2004 | yes | 6 | yes | 11 | yes |
39
-
40
-
41
- Scenario Outline: EDTF parses uncertain or approximate date strings
42
- When I parse the string "<string>"
43
- Then the year should be "<year>"
44
- And the month should be "<month>"
45
- And the day should be "<day>"
46
- And the date should be uncertain? "<uncertain>"
47
- And the date should be approximate? "<approximate>"
48
-
49
- @101 @level1
50
- Scenarios: uncertain date examples from the specification
51
- | string | year | month | day | uncertain | approximate |
52
- | 1984~ | 1984 | 1 | 1 | no | yes |
53
- | 1984?~ | 1984 | 1 | 1 | yes | yes |
54
-
55
- Scenario Outline: EDTF parses uncertain or approximate dates
56
- When I parse the string "<string>"
57
- And the year should be uncertain? "<?-year>"
58
- And the month should be uncertain? "<?-month>"
59
- And the day should be uncertain? "<?-day>"
60
- And the year should be approximate? "<~-year>"
61
- And the month should be approximate? "<~-month>"
62
- And the day should be approximate? "<~-day>"
63
-
64
- @201 @level2
65
- Scenarios: uncertain date examples from the specification
66
- | string | ~-year | ?-year | ~-month | ?-month | ~-day | ?-day |
67
- | 2004?-06-11 | no | yes | no | no | no | no |
68
- | 2004-06~-11 | yes | no | yes | no | no | no |
69
- | 2004-(06)?-11 | no | no | no | yes | no | no |
70
- | 2004-06-(11)~ | no | no | no | no | yes | no |
71
- | 2004-(06)?~ | no | no | yes | yes | no | no |
72
- | 2004-(06-11)? | no | no | no | yes | no | yes |
73
- | 2004?-06-(11)~ | no | yes | no | no | yes | no |
74
- | (2004-(06)~)? | no | yes | yes | yes | no | no |
75
- | 2004-06-(01)~ | no | no | no | no | yes | no |
76
- | (2004-(06-01)~)? | no | yes | yes | yes | yes | yes |
77
- | (2004-(06)?-01)~ | yes | no | yes | yes | yes | no |
78
- | 2004-06?-(01)~ | no | yes | no | yes | yes | no |
79
- | 2004~-(06)?-01~ | yes | no | no | yes | yes | no |
80
- | 2004~-(06-(01)~)? | yes | no | no | yes | yes | yes |
81
-
82
-
83
- Scenario: Invalid dates
84
- When I parse the following strings an error should be raised:
85
- | xyz |
86
- | x2009 |
87
- | 2004-04-(1)?1 |
88
-
89
-
@@ -1,18 +0,0 @@
1
- Feature: EDTF parses ISO 8601 interval strings
2
- As a user of edtf-ruby
3
- I want to parse ISO 8601 interval strings
4
-
5
- Scenario Outline: parse intervals
6
- When I parse the string "<string>"
7
- Then the interval should cover the date "<date>"
8
-
9
- @004 @level0
10
- Scenarios: specification intervals
11
- | string | date |
12
- | 1964/2008 | 1964-01-01 |
13
- | 2004-06/2006-08 | 2006-08-31 |
14
- | 2004-01-01/2004-01-02 | 2004-01-01 |
15
- | 2004-02-01/2005-02-08 | 2005-02-08 |
16
- | 2004-02-01/2005-02 | 2004-12-01 |
17
- | 2004-02-01/2005 | 2005-12-31 |
18
- | 2005/2006-02 | 2005-01-01 |
@@ -1,14 +0,0 @@
1
- Feature: Parse masked precision strings
2
-
3
- As a user of edtf-ruby
4
- I want to parse masked precision strings
5
-
6
- Scenario Outline: Masked precision strings
7
- When I parse the string "<string>"
8
- Then the duration should range from "<start>" to "<end>"
9
-
10
- @level2 @2041
11
- Scenarios: decades and centuries
12
- | string | start | end |
13
- | 196x | 1960 | 1969 |
14
- | 19xx | 1900 | 1999 |
@@ -1,129 +0,0 @@
1
- Feature: Parse partial uncertain or approximate dates
2
- As a Ruby programmer
3
- I want to convert Date/Time objects to EDTF strings
4
-
5
- @201 @level2
6
- Scenario Outline: Prints uncertain or approximate dates
7
- When I parse the string "<string>"
8
- Then the year should be uncertain? "<?-year>"
9
- And the month should be uncertain? "<?-month>"
10
- And the day should be uncertain? "<?-day>"
11
- And the year should be approximate? "<~-year>"
12
- And the month should be approximate? "<~-month>"
13
- And the day should be approximate? "<~-day>"
14
-
15
- Scenarios: Uncertain or approximate dates, day precision
16
- | date | precision | string | ?-year | ?-month | ?-day | ~-year | ~-month | ~-day |
17
- | 2004-06-01 | day | 2004-06-01?~ | yes | yes | yes | yes | yes | yes |
18
- | 2004-06-01 | day | 2004-06~-01? | yes | yes | yes | yes | yes | no |
19
- | 2004-06-01 | day | (2004~-06-(01)~)? | yes | yes | yes | yes | no | yes |
20
- | 2004-06-01 | day | 2004~-06?-(01)?~ | yes | yes | yes | yes | no | yes |
21
- | 2004-06-01 | day | 2004~-06-01? | yes | yes | yes | yes | no | no |
22
- | 2004-06-01 | day | (2004-(06-01)~)? | yes | yes | yes | no | yes | yes |
23
- | 2004-06-01 | day | 2004?-(06-01)?~ | yes | yes | yes | no | yes | yes |
24
- | 2004-06-01 | day | (2004-(06)~-01)? | yes | yes | yes | no | yes | no |
25
- | 2004-06-01 | day | 2004?-(06)?~-01? | yes | yes | yes | no | yes | no |
26
- | 2004-06-01 | day | (2004-06-(01)~)? | yes | yes | yes | no | no | yes |
27
- | 2004-06-01 | day | 2004-06?-(01)?~ | yes | yes | yes | no | no | yes |
28
- | 2004-06-01 | day | 2004-06-01? | yes | yes | yes | no | no | no |
29
- | 2004-06-01 | day | 2004-06?-01~ | yes | yes | no | yes | yes | yes |
30
- | 2004-06-01 | day | 2004-06?~-01 | yes | yes | no | yes | yes | no |
31
- | 2004-06-01 | day | 2004~-06?-(01)~ | yes | yes | no | yes | no | yes |
32
- | 2004-06-01 | day | 2004~-06?-01 | yes | yes | no | yes | no | no |
33
- # | 2004-06-01 | day | 2004-(06?-01)~ | yes | yes | no | no | yes | yes | is this correct?
34
- # | 2004-06-01 | day | 2004?-((06)?-01)~ | yes | yes | no | no | yes | yes |
35
- | 2004-06-01 | day | 2004?-(06)?~-01~ | yes | yes | no | no | yes | yes |
36
- # | 2004-06-01 | day | (2004-(06)~)?-01 | yes | yes | no | no | yes | no |
37
- | 2004-06-01 | day | 2004?-(06)?~-01 | yes | yes | no | no | yes | no |
38
- | 2004-06-01 | day | 2004-06?-(01)~ | yes | yes | no | no | no | yes |
39
- | 2004-06-01 | day | 2004-06?-01 | yes | yes | no | no | no | no |
40
- | 2004-06-01 | day | (2004?-06-(01)?)~ | yes | no | yes | yes | yes | yes |
41
- | 2004-06-01 | day | 2004?-06~-(01)?~ | yes | no | yes | yes | yes | yes |
42
- | 2004-06-01 | day | 2004?-06~-(01)? | yes | no | yes | yes | yes | no |
43
- | 2004-06-01 | day | 2004?~-06-(01)?~ | yes | no | yes | yes | no | yes |
44
- | 2004-06-01 | day | 2004?~-06-(01)? | yes | no | yes | yes | no | no |
45
- | 2004-06-01 | day | 2004?-(06-(01)?)~ | yes | no | yes | no | yes | yes |
46
- | 2004-06-01 | day | 2004?-(06)~-01?~ | yes | no | yes | no | yes | yes |
47
- | 2004-06-01 | day | 2004?-(06)~-01? | yes | no | yes | no | yes | no |
48
- | 2004-06-01 | day | 2004?-06-(01)?~ | yes | no | yes | no | no | yes |
49
- | 2004-06-01 | day | 2004?-06-(01)? | yes | no | yes | no | no | no |
50
- | 2004-06-01 | day | 2004?-06-01~ | yes | no | no | yes | yes | yes |
51
- | 2004-06-01 | day | 2004?-06~-01 | yes | no | no | yes | yes | no |
52
- | 2004-06-01 | day | 2004?~-06-(01)~ | yes | no | no | yes | no | yes |
53
- | 2004-06-01 | day | 2004?~-06-01 | yes | no | no | yes | no | no |
54
- | 2004-06-01 | day | 2004?-(06-01)~ | yes | no | no | no | yes | yes |
55
- | 2004-06-01 | day | 2004?-(06)~-01 | yes | no | no | no | yes | no |
56
- | 2004-06-01 | day | 2004?-06-(01)~ | yes | no | no | no | no | yes |
57
- | 2004-06-01 | day | 2004?-06-01 | yes | no | no | no | no | no |
58
- | 2004-06-01 | day | (2004-(06-01)?)~ | no | yes | yes | yes | yes | yes |
59
- | 2004-06-01 | day | 2004~-(06-01)?~ | no | yes | yes | yes | yes | yes |
60
- # | 2004-06-01 | day | 2004-(06~-01)? | no | yes | yes | yes | yes | no | is this correct?
61
- # | 2004-06-01 | day | 2004~-((06)~-01)? | no | yes | yes | yes | yes | no |
62
- | 2004-06-01 | day | 2004~-(06)?~-01? | no | yes | yes | yes | yes | no |
63
- | 2004-06-01 | day | 2004~-(06-(01)~)? | no | yes | yes | yes | no | yes |
64
- | 2004-06-01 | day | 2004~-(06)?-01?~ | no | yes | yes | yes | no | yes |
65
- | 2004-06-01 | day | 2004~-(06-01)? | no | yes | yes | yes | no | no |
66
- | 2004-06-01 | day | 2004-(06-01)?~ | no | yes | yes | no | yes | yes |
67
- # | 2004-06-01 | day | 2004-((06)~-01)? | no | yes | yes | no | yes | no |
68
- | 2004-06-01 | day | 2004-(06)?~-01? | no | yes | yes | no | yes | no |
69
- | 2004-06-01 | day | 2004-(06-(01)~)? | no | yes | yes | no | no | yes |
70
- | 2004-06-01 | day | 2004-(06)?-01?~ | no | yes | yes | no | no | yes |
71
- | 2004-06-01 | day | 2004-(06-01)? | no | yes | yes | no | no | no |
72
- | 2004-06-01 | day | (2004-(06)?-01)~ | no | yes | no | yes | yes | yes |
73
- | 2004-06-01 | day | 2004~-(06)?~-01~ | no | yes | no | yes | yes | yes |
74
- # | 2004-06-01 | day | (2004-(06)?)~-01 | no | yes | no | yes | yes | no |
75
- | 2004-06-01 | day | 2004~-(06)?~-01 | no | yes | no | yes | yes | no |
76
- | 2004-06-01 | day | 2004~-(06)?-01~ | no | yes | no | yes | no | yes |
77
- | 2004-06-01 | day | 2004~-(06)?-01 | no | yes | no | yes | no | no |
78
- # | 2004-06-01 | day | 2004-((06)?-01)~ | no | yes | no | no | yes | yes |
79
- | 2004-06-01 | day | 2004-(06)?~-01~ | no | yes | no | no | yes | yes |
80
- | 2004-06-01 | day | 2004-(06)?~-01 | no | yes | no | no | yes | no |
81
- | 2004-06-01 | day | 2004-(06)?-01~ | no | yes | no | no | no | yes |
82
- | 2004-06-01 | day | 2004-(06)?-01 | no | yes | no | no | no | no |
83
- | 2004-06-01 | day | (2004-06-(01)?)~ | no | no | yes | yes | yes | yes |
84
- | 2004-06-01 | day | 2004-06~-(01)?~ | no | no | yes | yes | yes | yes |
85
- | 2004-06-01 | day | 2004-06~-(01)? | no | no | yes | yes | yes | no |
86
- | 2004-06-01 | day | 2004~-06-(01)?~ | no | no | yes | yes | no | yes |
87
- | 2004-06-01 | day | 2004~-06-(01)? | no | no | yes | yes | no | no |
88
- | 2004-06-01 | day | 2004-(06-(01)?)~ | no | no | yes | no | yes | yes |
89
- | 2004-06-01 | day | 2004-(06)~-01?~ | no | no | yes | no | yes | yes |
90
- | 2004-06-01 | day | 2004-(06)~-01? | no | no | yes | no | yes | no |
91
- | 2004-06-01 | day | 2004-06-(01)?~ | no | no | yes | no | no | yes |
92
- | 2004-06-01 | day | 2004-06-(01)? | no | no | yes | no | no | no |
93
- | 2004-06-01 | day | 2004-06-01~ | no | no | no | yes | yes | yes |
94
- | 2004-06-01 | day | 2004-06~-01 | no | no | no | yes | yes | no |
95
- | 2004-06-01 | day | 2004~-06-(01)~ | no | no | no | yes | no | yes |
96
- | 2004-06-01 | day | 2004~-06-01 | no | no | no | yes | no | no |
97
- | 2004-06-01 | day | 2004-(06-01)~ | no | no | no | no | yes | yes |
98
- | 2004-06-01 | day | 2004-(06)~-01 | no | no | no | no | yes | no |
99
- | 2004-06-01 | day | 2004-06-(01)~ | no | no | no | no | no | yes |
100
- | 2004-06-01 | day | 2004-06-01 | no | no | no | no | no | no |
101
-
102
- Scenarios: Uncertain or approximate dates, month precision
103
- | date | precision | string | ?-year | ?-month | ?-day | ~-year | ~-month | ~-day |
104
- | 2004-06-01 | month | 2004-06?~ | yes | yes | no | yes | yes | no |
105
- | 2004-06-01 | month | 2004~-06? | yes | yes | no | yes | no | no |
106
- | 2004-06-01 | month | (2004-(06)~)? | yes | yes | no | no | yes | no |
107
- | 2004-06-01 | month | 2004?-(06)?~ | yes | yes | no | no | yes | no |
108
- | 2004-06-01 | month | 2004-06? | yes | yes | no | no | no | no |
109
- | 2004-06-01 | month | 2004?-06~ | yes | no | no | yes | yes | no |
110
- | 2004-06-01 | month | 2004?~-06 | yes | no | no | yes | no | no |
111
- | 2004-06-01 | month | 2004?-(06)~ | yes | no | no | no | yes | no |
112
- | 2004-06-01 | month | 2004?-06 | yes | no | no | no | no | no |
113
- | 2004-06-01 | month | (2004-(06)?)~ | no | yes | no | yes | yes | no |
114
- | 2004-06-01 | month | 2004~-(06)?~ | no | yes | no | yes | yes | no |
115
- | 2004-06-01 | month | 2004~-(06)? | no | yes | no | yes | no | no |
116
- | 2004-06-01 | month | 2004-(06)?~ | no | yes | no | no | yes | no |
117
- | 2004-06-01 | month | 2004-(06)? | no | yes | no | no | no | no |
118
- | 2004-06-01 | month | 2004-06~ | no | no | no | yes | yes | no |
119
- | 2004-06-01 | month | 2004~-06 | no | no | no | yes | no | no |
120
- | 2004-06-01 | month | 2004-(06)~ | no | no | no | no | yes | no |
121
- | 2004-06-01 | month | 2004-06 | no | no | no | no | no | no |
122
-
123
-
124
- Scenarios: Uncertain or approximate dates, year precision
125
- | date | precision | string | ?-year | ?-month | ?-day | ~-year | ~-month | ~-day |
126
- | 2004-06-01 | year | 2004?~ | yes | no | no | yes | no | no |
127
- | 2004-06-01 | year | 2004? | yes | no | no | no | no | no |
128
- | 2004-06-01 | year | 2004~ | no | no | no | yes | no | no |
129
- | 2004-06-01 | year | 2004 | no | no | no | no | no | no |
@@ -1,34 +0,0 @@
1
- Feature: Parse unspecified date strings
2
- As a user of EDTF-Ruby
3
- I want to be able to parse date strings containing unspecified elements
4
-
5
- Scenario Outline: parse unspecified dates
6
- When I parse the string "<string>"
7
- Then the year should be "<year>"
8
- And the month should be "<month>"
9
- And the day should be "<day>"
10
- And the unspecified string code be "<unspecified>"
11
-
12
- @102 @level1 @draft
13
- Scenarios: examples from the specification draft
14
- | string | year | month | day | unspecified |
15
- | 199u | 1990 | 1 | 1 | sssX-ss-ss |
16
- | 19uu | 1900 | 1 | 1 | ssXX-ss-ss |
17
- | 1999-uu | 1999 | 1 | 1 | ssss-XX-ss |
18
- | 1999-02-uu | 1999 | 2 | 1 | ssss-ss-XX |
19
- | 1999-uu-uu | 1999 | 1 | 1 | ssss-XX-XX |
20
-
21
- @102 @level1 @final
22
- Scenarios: examples from the specification draft
23
- | string | year | month | day | unspecified |
24
- | 199X | 1990 | 1 | 1 | sssX-ss-ss |
25
- | 19XX | 1900 | 1 | 1 | ssXX-ss-ss |
26
- | 1999-XX | 1999 | 1 | 1 | ssss-XX-ss |
27
- | 1999-02-XX | 1999 | 2 | 1 | ssss-ss-XX |
28
- | 1999-XX-XX | 1999 | 1 | 1 | ssss-XX-XX |
29
-
30
- Scenario: Completely unknown
31
- When I parse the string "uuuu"
32
- Then the result should be an Unknown
33
- When I parse the string "XXXX"
34
- Then the result should be an Unknown
@@ -1,79 +0,0 @@
1
- Feature: Print Date/Time objects as Level 0 EDTF strings
2
- As a Ruby programmer
3
- I want to convert Date/Time objects to EDTF strings
4
-
5
- @001 @level0
6
- Scenario: Convert simple dates
7
- Given the date "2004-08-12"
8
- When I convert the date
9
- Then the EDTF string should be "2004-08-12"
10
-
11
- @001 @level0
12
- Scenario: Convert simple negative dates
13
- Given the date "-0300-08-12"
14
- When I convert the date
15
- Then the EDTF string should be "-0300-08-12"
16
-
17
- @001 @level0
18
- Scenario: Convert simple dates with precision
19
- Given the date "1980-08-24" with precision set to "day"
20
- When I convert the date
21
- Then the EDTF string should be "1980-08-24"
22
- Given the date "1980-08-24" with precision set to "month"
23
- When I convert the date
24
- Then the EDTF string should be "1980-08"
25
- Given the date "1980-08-24" with precision set to "year"
26
- When I convert the date
27
- Then the EDTF string should be "1980"
28
-
29
- @001 @level0
30
- Scenario: Date Roundtrips
31
- When I parse the string "2001-02-03"
32
- When I convert the date
33
- Then the EDTF string should be "2001-02-03"
34
- When I parse the string "2001-02"
35
- When I convert the date
36
- Then the EDTF string should be "2001-02"
37
- When I parse the string "2001"
38
- When I convert the date
39
- Then the EDTF string should be "2001"
40
- When I parse the string "-9909"
41
- When I convert the date
42
- Then the EDTF string should be "-9909"
43
- When I parse the string "0000"
44
- When I convert the date
45
- Then the EDTF string should be "0000"
46
-
47
- @002 @level0
48
- Scenario: DateTime Roundtrips
49
- When I parse the string "2001-02-03T09:30:01"
50
- When I convert the date
51
- Then the EDTF string should be "2001-02-03T09:30:01"
52
- When I parse the string "2004-01-01T10:10:10Z"
53
- When I convert the date
54
- Then the EDTF string should be "2004-01-01T10:10:10+00:00"
55
- When I parse the string "2004-01-01T10:10:10+05:00"
56
- When I convert the date
57
- Then the EDTF string should be "2004-01-01T10:10:10+05:00"
58
-
59
- @004 @level0
60
- Scenario: Interval Roundtrips
61
- When I parse the string "1964/2008"
62
- When I convert the date
63
- Then the EDTF string should be "1964/2008"
64
- When I parse the string "2004-06/2006-08"
65
- When I convert the date
66
- Then the EDTF string should be "2004-06/2006-08"
67
- When I parse the string "2004-02-01/2005-02-08"
68
- When I convert the date
69
- Then the EDTF string should be "2004-02-01/2005-02-08"
70
- When I parse the string "2004-02-01/2005-02"
71
- When I convert the date
72
- Then the EDTF string should be "2004-02-01/2005-02"
73
- When I parse the string "2004-02-01/2005"
74
- When I convert the date
75
- Then the EDTF string should be "2004-02-01/2005"
76
- When I parse the string "2005/2006-02"
77
- When I convert the date
78
- Then the EDTF string should be "2005/2006-02"
79
-
@@ -1,137 +0,0 @@
1
- Feature: Print Date/Time objects as Level 1 EDTF strings
2
- As a Ruby programmer
3
- I want to convert Date/Time objects to EDTF strings
4
-
5
- @101 @level1
6
- Scenario: Uncertain or approximate dates
7
- When I parse the string "2001?"
8
- When I convert the date
9
- Then the EDTF string should be "2001?"
10
-
11
- When I parse the string "2004-06?"
12
- When I convert the date
13
- Then the EDTF string should be "2004-06?"
14
-
15
- When I parse the string "2004-06-11?"
16
- When I convert the date
17
- Then the EDTF string should be "2004-06-11?"
18
-
19
- When I parse the string "1984~"
20
- When I convert the date
21
- Then the EDTF string should be "1984~"
22
-
23
- When I parse the string "1984?~"
24
- When I convert the date
25
- Then the EDTF string should be "1984?~"
26
-
27
- @102 @level1 @draft
28
- Scenario: Unspecified dates
29
- When I parse the string "199u"
30
- When I convert the date
31
- Then the EDTF string should be "199X"
32
-
33
- When I parse the string "19uu"
34
- When I convert the date
35
- Then the EDTF string should be "19XX"
36
-
37
- When I parse the string "1999-uu"
38
- When I convert the date
39
- Then the EDTF string should be "1999-XX"
40
-
41
- When I parse the string "1999-01-uu"
42
- When I convert the date
43
- Then the EDTF string should be "1999-01-XX"
44
-
45
- When I parse the string "1999-XX-XX"
46
- When I convert the date
47
- Then the EDTF string should be "1999-XX-XX"
48
-
49
- @102 @level1 @final
50
- Scenario: Unspecified dates
51
- When I parse the string "199X"
52
- When I convert the date
53
- Then the EDTF string should be "199X"
54
-
55
- When I parse the string "19XX"
56
- When I convert the date
57
- Then the EDTF string should be "19XX"
58
-
59
- When I parse the string "1999-XX"
60
- When I convert the date
61
- Then the EDTF string should be "1999-XX"
62
-
63
- When I parse the string "1999-01-XX"
64
- When I convert the date
65
- Then the EDTF string should be "1999-01-XX"
66
-
67
- When I parse the string "1999-XX-XX"
68
- When I convert the date
69
- Then the EDTF string should be "1999-XX-XX"
70
-
71
- @103 @level1 @interval
72
- Scenario: Prints L1 Extended Intervals
73
- When I parse the string "unknown/2006"
74
- When I convert the date
75
- Then the EDTF string should be "unknown/2006"
76
-
77
- When I parse the string "2004-06-01/unknown"
78
- When I convert the date
79
- Then the EDTF string should be "2004-06-01/unknown"
80
-
81
- When I parse the string "2004-01-01/open"
82
- When I convert the date
83
- Then the EDTF string should be "2004-01-01/open"
84
-
85
- When I parse the string "1984~/2004-06"
86
- When I convert the date
87
- Then the EDTF string should be "1984~/2004-06"
88
-
89
- When I parse the string "1984/2004-06~"
90
- When I convert the date
91
- Then the EDTF string should be "1984/2004-06~"
92
-
93
- When I parse the string "1984~/2004~"
94
- When I convert the date
95
- Then the EDTF string should be "1984~/2004~"
96
-
97
- When I parse the string "1984?/2004?~"
98
- When I convert the date
99
- Then the EDTF string should be "1984?/2004?~"
100
-
101
- When I parse the string "1984-06?/2004-08?"
102
- When I convert the date
103
- Then the EDTF string should be "1984-06?/2004-08?"
104
-
105
- When I parse the string "1984-06-02?/2004-08-08~"
106
- When I convert the date
107
- Then the EDTF string should be "1984-06-02?/2004-08-08~"
108
-
109
- When I parse the string "1984-06-02?/unknown"
110
- When I convert the date
111
- Then the EDTF string should be "1984-06-02?/unknown"
112
-
113
- @104 @level1 @draft
114
- Scenario: Prints years with more than four digits
115
- When I parse the string "y170000002"
116
- When I convert the date
117
- Then the EDTF string should be "Y170000002"
118
-
119
- When I parse the string "y-170000002"
120
- When I convert the date
121
- Then the EDTF string should be "Y-170000002"
122
-
123
- @104 @level1 @final
124
- Scenario: Prints years with more than four digits
125
- When I parse the string "Y170000002"
126
- When I convert the date
127
- Then the EDTF string should be "Y170000002"
128
-
129
- When I parse the string "Y-170000002"
130
- When I convert the date
131
- Then the EDTF string should be "Y-170000002"
132
-
133
- @105 @level1 @season
134
- Scenario: Prints seasons
135
- When I parse the string "2001-21"
136
- When I convert the date
137
- Then the EDTF string should be "2001-21"
@@ -1,39 +0,0 @@
1
- Feature: Print Date/Time objects as Level 2 EDTF strings
2
- As a Ruby programmer
3
- I want to convert Date/Time objects to EDTF strings
4
-
5
- @202 @level2
6
- Scenario: Prints internal unspecified dates
7
- When I parse the string "156u-12-25"
8
- When I convert the date
9
- Then the EDTF string should be "156X-12-25"
10
-
11
- When I parse the string "156X-12-25"
12
- When I convert the date
13
- Then the EDTF string should be "156X-12-25"
14
-
15
- @205 @level2 @interval
16
- Scenario: Prints L2 extended intervals
17
- # When I parse the string "2004-06-(01)~/2004-06-(20)~"
18
- # When I convert the date
19
- # Then the EDTF string should be "2004-06-(01)~/2004-06-(20)~"
20
-
21
- When I parse the string "2004-06-uu/2004-07-03"
22
- When I convert the date
23
- Then the EDTF string should be "2004-06-XX/2004-07-03"
24
-
25
- When I parse the string "2004-06-XX/2004-07-03"
26
- When I convert the date
27
- Then the EDTF string should be "2004-06-XX/2004-07-03"
28
-
29
- @209 @level2 @season
30
- Scenario: Prints qualified seasons
31
- When I parse the string "2001-21^southernHemisphere"
32
- When I convert the date
33
- Then the EDTF string should be "2001-21^southernHemisphere"
34
-
35
- @207 @level2 @calendar
36
- Scenario: Prints calendar string
37
- When I parse the string "2001-02-03^xyz"
38
- When I convert the date
39
- Then the EDTF string should be "2001-02-03^xyz"