Toby Inkster committed cf4e1f4

shouldn't be necessary, but this seems to do this to pass tests when EXTENDED_TESTING

Comments (0)

Files changed (1)

 	my %cache;
+	sub _detect_type
+	{
+		my ($lib, $v) = @_;
+		for my $type (qw(DateTime Time Date GYearMonth GYear GMonthDay GDay GMonth)) {
+			return $type if $lib->get_type($type)->check($v);
+		}
+		return $lib->get_type('DateTime');
+	}
 	sub dt_cmp
 		my ($type, $a, $b) = @_;
+		$type = __PACKAGE__->_detect_type($a) unless $type;
 		$type = __PACKAGE__->get_type($type) unless ref $type;
 		my $A = eval($cache{"$type;a"} ||= $type->inline_check('$a'));
 		my $B = eval($cache{"$type;b"} ||= $type->inline_check('$b'));
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.