r7 - 26 Sep 2006 - 15:49:15 - MatthewEernisseYou are here: OSAF >  Documentation Web  > ScoobyJavaScriptLibraries

Scooby JS Libraries

NOTE: The date.add and date.diff code in the date.js library have been contributed to the Dojo JavaScript? Toolkit. The Cosmo Web UI (formerly known as Scooby) will also be replacing our use of this custom Hash with dojo.collections code. This page now is mainly just for historical interest, and there will be no further maintenance or update of this code.

date.js

Methods for formatting and manipulating dates in JavaScript.

[Download]

Date.strftime -- formats a date or time according to a given format string -- identical to the strftime function found in many scripting languages such as Perl, Ruby, or PHP. This naive implementation uses only English, but it is fairly easy to add your own localized language.

Date.add -- Does date incrementation. API is the same as VBScript's DateAdd function.

Date.diff -- Gets the difference between two dates in the specified units. API is the same as VBScript's DateDiff function.

hash.js

Implements a fairly robust Hash class that has many of the same methods for iterating and sorting as the PHP Array.

[Download]

Hash -- A class which implements something more robust than the JavaScript Array when used as a hash, including a length property, and various methods for sorting, stepping through, and removing items.

GlossaryForm
DisplayName Change Me!
GlossaryTermCategories

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.