07/08/2007 - (1.1.8) * Big thanks to Trent Richardson (http://www.trentrichardson.com) for taking the time to write the IsValid() function along with IsSimpleValue() and IsString(). 06/16/2007 - (1.1.7) * Replaced the old _CommaForThousands with Steven Levithan's commafy function. It smaller and probably quicker as it makes excellent use of regular expressions to accomplish the task. Thanks Steve! * Replaced the old trim function with one that Steve Levithan wrote. He's done some testing to prove that this particular regex is faster than the one that I was using. While the speed difference is probably negligible, it's still there. 06/14/2007 - (1.1.6) * Replaced the old DateFormat function with a better one from Steve Levithan (http://blog.stevenlevithan.com/). Steve's code was originally written as an extension of the JavaScript date object, and in the CFJS libraries this is not the case. Because of this, some of the functionality described on Steve's page is not available in the CFJS version. Also, this version of DateFormat allows for formatting Time. Since this differs from ColdFusion's way of doing things, I have made the TimeFormat function an alias of DateFormat. This means that the two functions are really the same. Thanks to Boyan Kostadinov for finding and suggesting Steve's code! :o) http://boyank.blogspot.com/) 05/30/2007 - (1.1.4) * Big thanks to my friend and co-worker Steven Van Gemert for adding two new functions to the CFJS library! * Added Pad(String [, Number] [, PadCharacter] [, PadDirection]) * Added RepeatString(String, Number) 05/16/2007 - (1.1.3) * Added the 'y' and 'ww' date parts to the DatePart() function. * Sync'd the jQuery and non-jQuery branches so they'd have the same functions 05/15/2007 - * Released the non-jQuery version of the cfjs library. Simply called cfjs.js 05/07/2007 - (1.1.2) Updated the IsArray() function to include the dimension checking feature. This function now behaves like its ColdFusion counterpart. 05/02/2007 - (1.1.1) * Added the following functions: - CreateDate() - CreateDateTime() - CreateTime() - CreateODBCDate() - CreateODBCDateTime() - CreateODBCTime() - DatePart() - IsLeapYear() * Fixed the sloppy JS code that was keeping the packed version from working... finally! :o) NOTES: Two of the date parts for the DatePart() function are not yet implemented. Namely: y (day of year) and ww (week of year). I'll get to those soon. CreateDate(), CreateDateTime(), and CreateTime() return valid JavaScript date objects. The CreateODBCxxx functions take valid JavaScript date objects and return strings that are correctly formatted ODBC date/time/timestamp strings. 05/01/2007 - * Fixed more problems with _CommaForThousands() which caused problems with DollarFormat() and DecimalFormat(). _CommaForThousands(), now properly handles negative numbers and numbers passed with decimals. I think I've worked out all the kinks in these three functions, and I think I've tested sufficiently, but please, if you encounter any bugs, please log them on cfjs.riaforge.org or jquery.com/plugins. 04/22/2007 - * updated this changlog - reformatted the list of available methods - moved alot of the comments that were in the core unpacked source over here to save space. * Added two good examples to the comments section of the core unpacked source. I will be adding examples to the web soon. * Added the remaining list functions: - ListAppend - ListChangeDelims - ListContains - ListContainsNoCase - ListInsertAt - ListSetAt - ListSort - ListValueCount - ListValueCountNoCase * Added IsBoolean() * Added ArrayPrepend() The only list function missing is ListQualify(). This doesn't seem a very useful function to me in javaScript. If anyone disagrees and wants me to include it, please let me know, and I'll add it. 04/21/2007 - * Turns out that the "bug" in DollarFormat() wasn't really the fault of that function. The *real* bug was in _CommaForThousands(). It looks like this function was never ment to handle large numbers (more than 5 or 6 digits). I have entirely rewritten the function and it will now handle any number of digits - always putting the commas in the appropriate places. * 1.0.4a One more minor bug in _CommaForThousands(). It now supresses commas if the overall length of the number is less than three. 04/17/2007 - * Fixed bug in DollarFormat() 03/11/2007 - * Modified the code to be a jQuery plug-in. 02/??/2007 - (I'm unsure of the exact dates of the following. It was before I was keeping strict track of bug fixes and additions.) * Fixed bug in ListAppend() that was returning lists with leading and trailing delimiters (,item1,item2,item3,). Now lists return properly (item1,item2,item3). * Fixed bug in LTrim(), RTrim() and Trim(). All three of these functions threw an error if they were passed an empty string. Now they will pass back an empty string if one is passed in. * Fixed neumeric data type bug in all List functions. 01/01/2007 - * Renamed the LeftCorner object to CFJS (ColdFusion JavaScript). This was really a personal preference and it's shorter. :o) [------ Credit where credit is due ------] DateFormat() and TimeFormat() were modified by Steven Van Gemert from functions found on the web. I could not locate the original author. DateDiff modified from a function written by Rob Eberhardt, Slingshot Solutions - http://slingfive.com/ IsDate modified from a function written by Craig H. Rettig, Bit Bucket Heaven - http://www.bitbucketheaven.com/ DollarFormat was modified from a function called FormatCurrency listed by multiple authors, could not locate the true author StructKeyExists(): Thanks to Daemach and Dan G. Switzer, II from the jQuery discussion list for requesting this function, and then providing a method for accomplishing it! :o) [------ Available Methods (67, so far!) ------] Mathmatical (3) ----------- Abs(number) Ceiling(number) Round(number [, number of decimal places])* Array (5) ----- ArrayAppend(array, value) *ArrayAverage() *ArrayClear() *ArrayDeleteAt() *ArrayInsertAt() ArrayLen(array) *ArrayPrepend(array, value) ArraySort(array, sort_type [, sort_order ]) *ArraySum() ArrayToList(array [, delimiter ]) IsArray(value) // does not do dimension checking yet *The above stared items are on my To-Do list. :o) String (21) ------ Compare(string1, string2) CompareNoCase(string1, string2) DecimalFormat(number) DollarFormat(number) Find(substring, string) FindNoCase(substring, string) Insert(substring, string, position) LCase(string) Left(string, count) Len(sting) LTrim(string) Mid(string, start, count) Replace(string, substring1, substring2 [, scope ]) ReplaceNoCase(string, substring1, substring2 [, scope ]) Reverse(string) Right(string, count) RTrim(string) Trim(string) UCase(string) URLDecode(string) URLEncodedFormat(string) Date and Time (12) ------------- CreateDate(year, month, day) CreateDateTime(year, month, day, hours, minutes, seconds) CreateTime(hours, minutes, seconds) CreateODBCDate(DateObject) CreateODBCDateTime(DateObject) CreateODBCTime(DateObject) DateDiff(datepart, date1, date2) DateFormat(dateObj, mask) DatePart(DateObject, DatePart) TimeFormat(dateObj, mask) IsDate(date) IsLeapYear(year) Decision (7) -------- IsArray(value) IsBoolean(value) IsDate(date) IsDefined(value) IsLeapYear(year) IsNumeric(string) IsStruct(struct) List (19) ---- ListAppend(list, value, [, delimiters]) ListChangeDelims(list, new_delimiter [, current_delimiter]) ListContains(list, substring [, delimiter]) ListContainsNoCase(list, substring [, delimiter]) ListDeleteAt(list, position [, delimiter ]) ListFind(list, value [, delimiter ])) ListFindNoCase(list, value [, delimiter ])) ListFirst(list, [, delimiter ]) ListGetAt(list, position [, delimiter ])) ListInsertAt(list, position, value [, delimiter ]) ListLast(list, [, delimiter ]) ListLen(list [, delimiter]) ListPrepend(list, value, [, delimiter]) ListRest(list [, delimiter]) ListSetAt(list, position, value [, delimiter ]) ListSort(list, sort_type [, sort_order] [, delimiter ]) ListToArray(list [, delimiter]) ListValueCount(list, value [, delimiter ]) ListValueCountNoCase(list, value [, delimiter ]) Structure** (4) --------- StructKeyArray (struct) StructKeyExists (struct, key) StructKeyList (struct [, delimiter]) IsStruct(struct) [------ NOTES ------] *NOTE: Round works slightly different in randy's implementation verses ColdFusion. ColdFusion only rounds whole numbers. $.Round() allows an optional argument for the number of decimal places to round. **NOTE: In JavaScript what a CF programmer would call a structure is called a hash. A hash is also an associative array. Both are objects, and both can be accessed the same way that they are accessed in ColdFusion (using dot or array notation). Please check this excellent page (http://www.quirksmode.org/js/associative.html) for much more detailed information. :o)