Revision: 4127 http://vexi.svn.sourceforge.net/vexi/?rev=4127&view=rev Author: clrg Date: 2011-05-12 00:20:42 +0000 (Thu, 12 May 2011)
Log Message: ----------- Add constructor to allow 'new vexi.util.date("date", "format");' creation Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/vexi/util/date.t Modified: trunk/org.vexi-vexi.widgets/src_main/vexi/util/date.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/vexi/util/date.t 2011-05-12 00:07:40 UTC (rev 4126) +++ trunk/org.vexi-vexi.widgets/src_main/vexi/util/date.t 2011-05-12 00:20:42 UTC (rev 4127) @@ -44,6 +44,14 @@ * getWeekday(y, m, d) returns the name of day 'd' in month 'm' in year 'y' + + * compareTo(Date) + compares the date object to another date, returning + -1 if before, 0 if the same, and 1 if greater + + * isDateInRange(Date1, Date2) + compares the date object to another date, returning + -1 if before, 0 if the same, and 1 if greater This template is useful as a preapply or as an alternative to the JS date object returned by vexi.date(). @@ -74,6 +82,16 @@ thisobj.weekday ++= static.weekdayRead; thisobj.monthname ++= static.monthnameRead; + if (arguments[0]) { + switch (typeof(arguments[0])) { + case "string": + static.parseDate(arguments[0], arguments[1], thisobj); + break; + default: + break; + } + } + </js:Object> /** date read trap */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn