Package jason.stdlib
Class date
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.date
- All Implemented Interfaces:
InternalAction
,Serializable
@Manual(literal=".date(year,month,day)",
hint="gets the current date (year, month, and day of the month)",
argsHint={"the 4-digit year","the month (from 1 to 12)","the day (from 1 to 31)"},
argsType={"number","number","number"},
examples={".date(Y,M,D): unifies Y with the current year, M with the current month, and D with the current day",".date(2006,12,30): succeeds if the action is run on 30/Dec/2006 and fails otherwise"},
seeAlso="jason.stdlib.time")
public class date
extends DefaultInternalAction
Internal action: .date(YY,MM,DD)
.
Description: gets the current date (year, month, and day of the month).
Parameters:
- +/- year (number): the 4-digit year.invalid input: '<'/li/>
- +/- month (number): the month (1--12).
- +/- day (number): the day (1--31).
Examples:
-
.date(Y,M,D)
: unifies Y with the current year, M with the current month, and D with the current day. -
.date(2006,12,30)
: succeeds if the action is run on 30/Dec/2006 and fails otherwise.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InternalAction
create()
execute
(TransitionSystem ts, Unifier un, Term[] args) date(YY,MM,DD)int
int
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
date
public date()
-
-
Method Details
-
create
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgs
in classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgs
in classDefaultInternalAction
-
execute
date(YY,MM,DD)- Specified by:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
Exception
-