Formatted Date (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.2-dev31, 2.7 (support variables in format)

Syntax

%dates% formatted [human-readable] [(with|as) %-string%]

Description

Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this <a href="https://en.wikipedia.org/wiki/ISO_8601">Wikipedia article</a>.

Examples

command /date:
	trigger:
		send "Full date: %now formatted human-readable%" to sender
		send "Short date: %now formatted as "yyyy-MM-dd"%" to sender

View source