Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WeGA-WebApp-lib
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
busoni-schriften
WeGA-WebApp-lib
Commits
f1db2081
Commit
f1db2081
authored
4 years ago
by
Christian Schaper
Browse files
Options
Downloads
Patches
Plain Diff
print dates with certainty specifications
parent
4b4e1118
Branches
merge1.4
Branches containing commit
No related tags found
1 merge request
!2
Merge1.4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xquery/date.xqm
+8
-1
8 additions, 1 deletion
xquery/date.xqm
with
8 additions
and
1 deletion
xquery/date.xqm
+
8
−
1
View file @
f1db2081
...
...
@@ -222,7 +222,14 @@ declare function date:printDate($date as element()?, $lang as xs:string, $get-la
else
if
(
normalize-space
(
$date
)
castable
as
xs:date
)
then
date:format-date
(
xs:date
(
normalize-space
(
$date
))
,
$picture-string
,
$lang
)
else
$get-language-string
(
'dateUnknown'
,
())
return
if
(
exists
(
$myDate
))
then
string
(
$myDate
)
if
(
exists
(
$myDate
))
then
if
(
exists
(
$date
/
@cert
))
then
switch
(
$date
/
@cert
)
case
'high'
return
$get-language-string
(
'prob'
,
(
string
(
$myDate
)
,
$lang
))
case
'medium'
return
$get-language-string
(
'circa'
,
(
string
(
$myDate
)
,
$lang
))
case
'unknown'
return
$get-language-string
(
'certUnknown'
,
(
string
(
$myDate
)
,
$lang
))
default
return
$get-language-string
(
'prob'
,
(
string
(
$myDate
)
,
$lang
))
else
string
(
$myDate
)
else
error
(
$date:DATE_FORMAT_ERROR
,
string-join
((
'date:printDate()'
,
'wrong date format'
,
serialize
(
$date
,
<output:serialization-parameters><output:method>
text
</output:method></output:serialization-parameters>
))
,
' ;; '
))
)
else
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment