How to implement the date into a plugin!

Discussion in 'Plugin Development' started by Mortal_Wombat, Jul 23, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Mortal_Wombat

    Hello Everybody! Mortal_Wombat here (again :p). With a new question I want to make a "news" plugin. That would display whats going on around the server etc. but its not that i need help with it's adding a date function.

    Example

    ------[Server News]------

    Day: 7/23/2014 <--- How would i do this.

    News:

    Blah blah blah



    And to be specific for the help. Getting the date of the console would work. But i saw a plugin that used timeanddate.com (from memory don't quote me on the URL lol). So just helping me out on how to do this would be great!

    Thank you Very much in advance!

    ~Mortal/MoMo/Morty/Womby/Mort
     
  2. Offline

    AGuyWhoSkis

  3. Offline

    Are52Tap

    You can also try this:
    Code:java
    1. Date d = new Date(System.currentTimeMillis());
    2. String date = d.getMonth() + "/" + d.getDay() + "/" + d.getYear();
    3. this.logger.info("The date is " + date)
     
  4. Offline

    Mortal_Wombat

    Are52Tap and AGuyWhoSkis like this.
Thread Status:
Not open for further replies.

Share This Page