Enforcer provides the following cateogries of Oasis functions accessible from ALFA. These functions can be used as part of an expression inside a policy.
To make use of these functions from inside an ALFA file, use the import statement:
import Oasis.Functions
import Enforcer.Functions
Time
Years
Namespace : Enforcer.Functions
function Years = "urn:rsk:function:years-duration-from-integer"
: value:integer -> duration
Turns an integer number of years into a duration.
Months
Namespace : Enforcer.Functions
function Months = "urn:rsk:function:months-duration-from-integer"
: value:integer -> duration
Turns an integer number of months into a duration.
Days
Namespace : Enforcer.Functions
function Days = "urn:rsk:function:days-duration-from-integer"
: value:integer -> duration
Turns an integer number of days into a duration.
Hours
Namespace : Enforcer.Functions
function Hours = "urn:rsk:function:hours-duration-from-integer"
: value:integer -> duration
Turns an integer number of hours into a duration.
Minutes
Namespace : Enforcer.Functions
function Minutes = "urn:rsk:function:minutes-duration-from-integer"
: value:integer -> duration
Turns an integer number of minutes into a duration.
Seconds
Namespace : Enforcer.Functions
function Seconds = "urn:rsk:function:seconds-duration-from-integer"
: value:integer -> duration
Turns an integer number of seconds into a duration.