Skip to content

Commit ff69be7

Browse files
committed
Finish 3.0.7
2 parents 054805a + ee6d3c1 commit ff69be7

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.6
1+
3.0.7

lib/rdf/model/literal/datetime.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module RDF; class Literal
66
# @since 0.2.1
77
class DateTime < Literal
88
DATATYPE = RDF::URI("http://www.w3.org/2001/XMLSchema#dateTime")
9-
GRAMMAR = %r(\A(-?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)((?:[\+\-]\d{2}:\d{2})|UTC|GMT|Z)?\Z).freeze
9+
GRAMMAR = %r(\A(-?(?:\d{4}|[1-9]\d{4,})-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)((?:[\+\-]\d{2}:\d{2})|UTC|GMT|Z)?\Z).freeze
1010
FORMAT = '%Y-%m-%dT%H:%M:%S%:z'.freeze
1111

1212
##

spec/model_literal_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ def self.literals(*selector)
694694
2010-01-01T01:00:00+01:00
695695
2009-12-31T23:00:00-01:00
696696
-2010-01-01T00:00:00Z
697+
20010-01-01T00:00:00Z
698+
-20010-01-01T00:00:00Z
699+
0052-01-01T00:00:00Z
700+
-0052-01-01T00:00:00Z
697701
),
698702
%w(
699703
foo
@@ -705,6 +709,10 @@ def self.literals(*selector)
705709
0000-01-01T00:00:00
706710
2010-07
707711
2010
712+
52-01-01T00:00:00Z
713+
052-01-01T00:00:00Z
714+
-52-01-01T00:00:00Z
715+
-052-01-01T00:00:00Z
708716
) + ['2010-01-01T00:00:00Z foo', 'foo 2010-01-01T00:00:00Z']
709717

710718
context "object values" do

0 commit comments

Comments
 (0)