Skip to content

Commit

Permalink
allow for negative years
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzBuehmann committed Dec 15, 2020
1 parent 1166acf commit a6c7719
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package net.sansa_stack.rdf.common.partition.layout
import java.time.LocalDate
import java.time.format.DateTimeFormatter

import scala.reflect.runtime.universe.Type
import scala.reflect.runtime.universe.typeOf
import scala.reflect.runtime.universe.{Type, typeOf}

import org.apache.jena.graph.Triple

import net.sansa_stack.rdf.common.partition.core.RdfPartitionerDefault
import net.sansa_stack.rdf.common.partition.schema.SchemaStringDate
import org.apache.jena.graph.Triple



Expand All @@ -22,7 +22,7 @@ object TripleLayoutStringDate
override def schema: Type = typeOf[SchemaStringDate]

// this is a more error tolerant date parser also allowing 1999-5-5 etc.
private val formatter = DateTimeFormatter.ofPattern("y-M-d")
private val formatter = DateTimeFormatter.ofPattern("u-M-d")

override def fromTriple(t: Triple): SchemaStringDate = {
val s = t.getSubject
Expand Down

0 comments on commit a6c7719

Please sign in to comment.