Giter Site home page Giter Site logo

timeoperate-expansion's Introduction

TimeOperate-Expansion

Time operating expansion for PlaceholderAPI

Install

  • Download jar file from releases.
  • Put the jar file to /plugins/PlaceholderAPI/expansions/
  • Execute command /papi register <filename> or /papi reload or restart server.

Usage

// Arguments: <Required> [Optional]

%timeoperate_<time>_<format>[_<time override>]%

Type {placeholder} or (placeholder) if you want to use some placeholders in arguments.

I am not a native English speaker. There are maybe some typo error.

Time

value detail example
now now time now
timestamp timestamp (in seconds) 1675353600
DateTimeFormatter|value specific format time yyyy-MM-dd|2023-02-03

Format

Use unix for returning timestamp (in seconds).

Or read the DateTimeFormatter Javadoc page about possible formats.

Time Override

value detail example
+DURATION plus time, needed number and unit (ignore case), d means day(s), h means hour(s), m means minute(s), s means second(s) +1d2h
-DURATION minus time, needed number and unit (ignore case), d means day(s), h means hour(s), m means minute(s), s means second(s) -1d2h
unit=value set specific time y=2023

Support multi overrides, connect them with _.

Specific Time Unit

value detail
y, year Year
M, month Month
d, day Day
h, hour Hour
m, minute Minute
s, second Second

Examples

// Get timestamp (in second) of tomorrow 6:00
%timeoperate_now_unix_+1d_h=0_m=0_s=0%
// Get time of tomorrow but minute and second are 0 with custom format
%timeoperate_now_yyyy/MM/dd HH:mm:ss_+1d_m=0_s=0%

timeoperate-expansion's People

Contributors

mrxiaom avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.