
Date Time Functions
Source (link to git-repo or to original if based on someone elses unmodified work):
This is an extensive date/time library for Kommander. Some of this is available using date in an exec() call but if you have loops processing lots of data those calls are slow. There are some very cool things in here.
* auto-recognize DateTime/Date/Time
* tell your program what type it sees
* add DateTime
* multiply time by a value
* subtract time
* add a list of time values
* convert time to decimal value to divide by time
* much more
If you are working with time or especially database logging this is a must have.
version 0.4
* added fractionalMinutes - takes a time value and returns a decimal value 01:10:30 = 70.5
* added fractionalHours - takes a time value with optional days and returns a decimal value 2 02:30:00 = 50.5
Version 0.3
* Fixed bug in date time compare that gave the right answer only once in a while
* added function for checking if the request is being made for DateTime, Date or time - user callable
* Test and intelligently handle requests for addSecs, addDays, addMonths and addYears based on the type they are called with
version 0.2
* Added time subtract function
* Made DateTime compare intelligently detect DateTime, Date and Time and validate each - now correctly returns 0 for equal time.
See the description on the release page on site. All kinds of functions, about 20. Most accept a date or use today's date if none was entered, plus I threw in a true 2 decimal place rounding function as it is missing... sorely missing if you're using Postgres and having to do a string remove on 6 zeros and finding 0.375 slipping by...
Ratings & Comments
2 Comments
download link doesn't works.
I don't think it was the wrong link, but I know the server was down for a bit. I checked on the newest version and downloaed it just to be sure. If it's not working now something would have to be really weird.