Date Shenanigans 2.1

Adds new Skript expressions for getting real date information from the server or variables

  1. zmolahah
    Native Minecraft Version:
    1.15
    Tested Minecraft Versions:
    • 1.15
    This adds the following expressions to Skript:

    day of [the] week [value] [(of|for|at) %date%] - Returns the day of the week, for example "Tuesday" or if value is used returns it as an integer
    day [value] [(of|for|at) %date%] - Returns the day of the month, for example "25th" or if value is used returns it as an integer
    month [value] [(of|for|at) %date%] - Returns the month, for example "February" or if value is used returns it as an integer
    year [(of|for|at) %date%] - Returns the year, for example "2020"
    real[ ]time [(of|for|at) %date%] - Returns the time, for example "2:38:24"
    time[ ]zone [(of|for|at) %date%] - Returns the time zone being used
    hour[\s] [(of|for|at) %date%] - Returns the hour, for example "20" if 8 pm
    minute[\s] [(of|for|at) %date%] - Returns the minute, for example "13" if 8:13 pm
    second[\s] [(of|for|at) %date%] - Returns the second, for example "12" if 8:13:12 pm
    duration [format] of %date% [and %date%] - Returns the difference between two dates (of if the second date is not set difference between the date and now) but formatted with apache. For example send duration of 1.4 hours and 10 seconds from now and now will return 1h 24m 10s this also tells you when something was completed

    Dependencies
    Skript Mirror

    Older Versions:
    SkUnity

    Example
    Code (Text):
    command /date:
      trigger:
        send "&a(Today) &f%day%, %month%, %year% (%day of the week% at %real time%)"
        set {_date} to now
        add 1000 days to {_date}
        send "&c(1000 days from now) &f%day of {_date}%, %month of {_date}%, %year of {_date}% (%day of the week for {_date}% at %realtime of {_date}%)"