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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InternalActioncreate()execute(TransitionSystem ts, Unifier un, Term[] args) date(YY,MM,DD)intintMethods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
date
public date()
-
-
Method Details
-
create
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgsin classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgsin classDefaultInternalAction
-
execute
date(YY,MM,DD)- Specified by:
executein interfaceInternalAction- Overrides:
executein classDefaultInternalAction- Throws:
Exception
-