DateTimes

interface DateTimes : Variable

时间工具类, 用于操作时间.

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun create(timestamp: Long, zone: String?): ScriptDateTime

根据时间戳以及时区创建 ScriptDateTime 对象.

abstract fun create(year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int, millis: Int, zone: String?): ScriptDateTime

根据年月日时分秒毫秒以及时区创建 ScriptDateTime.

Link copied to clipboard
abstract fun getGlobalName(): String

获取作为全局变量时的名称.

Link copied to clipboard
abstract fun getPublicType(): Type

获取 Variable 注入到脚本时需要显示的类型.

Link copied to clipboard
abstract fun getTimestamp(): Long

获取系统当前时间戳.

Link copied to clipboard
abstract fun isPrefixRequired(): Boolean

是否需要添加前缀, 每种编程语言添加的前缀不一样, 前缀可以通过 Language.getVariablePrefix 获取.

Link copied to clipboard
abstract fun isSuffixRequired(): Boolean

是否需要添加后缀, 每种编程语言添加的后缀不一样, 后缀可以通过 Language.getVariableSuffix 获取.