Skip to content

Proper calulation of datetime of duration #13

Open
@woutslabbinck

Description

@woutslabbinck

"" time:localTime ?currentTime . # Current time
(?durationValue ?DType) log:dtlit ?duration .
(?durationValue xsd:dayTimeDuration) log:dtlit ?durationDayTime .
(?currentTime ?durationDayTime) func:add-dayTimeDuration-to-dateTime ?time . # ?time is the time that the cronJob should fire

Following part of the rule uses built-ins to calculate a new time for a duration.

However it fails when the duration contains Months or Years (e.g. P1Y2M3DT10H30M^^xsd:duration).

This should be fixed such that everything from duration is handled.

Suggestion, this can maybe even make a backward chaining rule to not reproduce it in multiple parts in the codebase?

Pointer: https://eulersharp.sourceforge.net/2003/03swap/eye-builtins.html

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions