Class ExprDateTimestamp
java.lang.Object
io.github.syst3ms.skriptparser.lang.properties.PropertyExpression<SkriptDate, Number>
io.github.syst3ms.skriptparser.expressions.ExprDateTimestamp
- All Implemented Interfaces:
Expression<Number>, SyntaxElement
The timestamp of a date.
The default timestamp returns the amount of milliseconds since the Unix Epoch.
The unix timestamp returns the amount of seconds since that same date.
The Unix Epoch is defined as January 1st 1970.
- Since:
- ALPHA
-
Field Summary
Fields inherited from class PropertyExpression
PROPERTY_IDENTIFIER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(SkriptDate owner) For each owner, this method will be ran individually to convert it to this particular property.booleaninit(Expression<?>[] expressions, int matchedPattern, ParseContext parseContext) This defaultinit()implementation automatically properly sets the owner of this property, which can be accessed usingPropertyExpression.getOwner().toString(TriggerContext ctx, boolean debug) Methods inherited from class PropertyExpression
composePatterns, getOwner, getValues, isGenitive, isSingle, setOwner, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
acceptsChange, acceptsChange, acceptsChange, change, check, check, convertExpression, getArray, getReturnType, getSingle, getSource, isAndList, isLoopOf, iterator, setAndList, stream
-
Constructor Details
-
ExprDateTimestamp
public ExprDateTimestamp()
-
-
Method Details
-
init
Description copied from class:PropertyExpressionThis defaultinit()implementation automatically properly sets the owner of this property, which can be accessed usingPropertyExpression.getOwner(). If this implementation is overridden for one reason or another, it must callPropertyExpression.setOwner(Expression)properly.- Specified by:
initin interfaceSyntaxElement- Overrides:
initin classPropertyExpression<SkriptDate, Number>- Parameters:
expressions- an array of expressions representing all the expressions that are being passed to this syntax element.matchedPattern- the index of the pattern that was successfully matched. It corresponds to the order of the syntaxes in registrationparseContext- an object containing additional information about the parsing of this syntax element, like regex matches and parse marks- Returns:
- whether the initialization was successful or not.
- See Also:
-
getProperty
Description copied from class:PropertyExpressionFor each owner, this method will be ran individually to convert it to this particular property.- Overrides:
getPropertyin classPropertyExpression<SkriptDate, Number>- Parameters:
owner- the owner- Returns:
- the property value
-
toString
- Specified by:
toStringin interfaceSyntaxElement- Overrides:
toStringin classPropertyExpression<SkriptDate, Number>- Parameters:
ctx- the eventdebug- whether to show additional information or not- Returns:
- a
Stringthat should aim to resemble what is written in the script as closely as possible
-