Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790

    Lua Date & Time Library

    Very nice OOP style Lua date & time library here http://luaforge.net/frs/?group_id=209&release_id=508

    Just drop the date.lua file in the Scripts folder and add require("date") to your globals. There is a very good help file included.

    Example of the diff method
    Code:
    -- get the days between two dates
    local diff = date.diff("Jan 7 2010", "Jan 12 2010")
    Dialog.Message("Diff", diff:spandays())
    There is also spanhours, spanminutes and spanseconds methods

    You can also do cool stuff like this
    Code:
    local a = date("Jan 7 2010")
    local b = date("Jan 12 2010")
    
    local days = (b-a):spandays()
    Dermot

    I am so out of here

  2. #2
    Join Date
    Feb 2009
    Posts
    1,285
    Nice!
    I was looking for something like this some time ago for a project, now suspended. I think I'll continue the project one day.. I hope to..

    Thanks Dermot!

  3. #3
    Join Date
    May 2006
    Posts
    5,380
    nice find Dermot

    this can really help

    i give it 30 minuets before Bas works this into his LOOP plugin
    Open your eyes to Narcissism, Don't let her destroy your life!!

  4. #4
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by RizlaUK View Post
    nice find Dermot

    this can really help

    i give it 30 minuets before Bas works this into his LOOP plugin
    ....

    Nice find Dermot!
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  5. #5
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    The license agreement strictly prohibits the making of an AMS plugin from this library.

    Seriously though, this does not need to be made into a plugin. It is one small lua file and it is very very easy to use.
    Dermot

    I am so out of here

  6. #6
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by Dermot View Post
    The license agreement strictly prohibits the making of an AMS plugin from this library.

    Seriously though, this does not need to be made into a plugin. It is one small lua file and it is very very easy to use.
    No indeed, you could copy-paste the code to globals lol. I must say,
    I laughed when I read the in-script comment 'keep out of reach of children.' haha
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts