Package jason.stdlib
Class date
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.date
- All Implemented Interfaces:
InternalAction
,java.io.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.
- +/- 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:
time
,nano_time
,function time
, Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private static InternalAction
singleton
-
Constructor Summary
Constructors Constructor Description date()
-
Method Summary
Modifier and Type Method Description static InternalAction
create()
java.lang.Object
execute(TransitionSystem ts, Unifier un, Term[] args)
date(YY,MM,DD)int
getMaxArgs()
int
getMinArgs()
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
singleton
-
-
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
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exceptiondate(YY,MM,DD)- Specified by:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
java.lang.Exception
-