Interpreting the '10d5h'-type timestamp

Discussion in 'Plugin Development' started by ZephireNZ, Sep 8, 2013.

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

    ZephireNZ

    Is there an established way to do this - to get a millisecond value from a timestamp like the one above?
    I've seen it done before in many plugins, and wanted to implement it myself. I was about to do some research to look at their code and see what I could find, but I thought I'd might as well ask here as well.
    Is there a method from Java or even Bukkit that will easily convert to and from the timestamp, or do I have to create the functions myself?
     
  2. Offline

    Tarestudio

  3. Offline

    ZephireNZ

    Thanks for that.

    I had a look at the Timestamp code from Essentials (used for ban lengths etc), and I think I'll see what I can do with Patterns. It means that the user can be more specific (I wasn't clear on it, but in your example both fields must be there). This is what I'm referring to.
     
  4. Offline

    xize

Thread Status:
Not open for further replies.

Share This Page