Skip to content
Snippets Groups Projects
Commit e7466472 authored by Christian Schaper's avatar Christian Schaper
Browse files

oneNormalizedDate bei /

parent df9fc8e2
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,8 @@ declare variable $date:DATE_FORMAT_ERROR := QName("http://xquery.weber-gesamtaus
: @return the constructed date as xs:date or empty
:)
declare function date:getOneNormalizedDate($date as element()?, $latest as xs:boolean) as xs:date? {
if($latest) then max($date/@* ! date:getCastableDate(., $latest))
else min($date/@* ! date:getCastableDate(., $latest))
if($latest) then max($date/@* ! date:getCastableDate(functx:substring-after-if-contains(., '/'), $latest))
else min($date/@* ! date:getCastableDate(functx:substring-before-if-contains(., '/'), $latest))
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment