Revision: 4564 http://sourceforge.net/p/vexi/code/4564 Author: mkpg2 Date: 2013-10-10 17:23:26 +0000 (Thu, 10 Oct 2013) Log Message: ----------- Date.time. Return time (if available).
Modified Paths: -------------- branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java Modified: branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp =================================================================== --- branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp 2013-10-10 16:00:16 UTC (rev 4563) +++ branches/vexi3/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp 2013-10-10 17:23:26 UTC (rev 4564) @@ -170,6 +170,7 @@ case "weekday": return getPartJS(key); case "hours": return getPartJS(key); case "minutes": return getPartJS(key); + case "time": return JSU.S(date.formatTime()); case "seconds": throw new JSExn("Unsupported: "+key); case "scheme": return JSU.S(date.getScheme().name); Modified: branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java =================================================================== --- branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java 2013-10-10 16:00:16 UTC (rev 4563) +++ branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java 2013-10-10 17:23:26 UTC (rev 4564) @@ -285,9 +285,7 @@ if(scheme==SCHEME_YMDHM || scheme==SCHEME_YMDH){ int month = expectPart(PART_MONTH); int day = expectPart(PART_DAY); - int hour = expectPart(PART_HOUR); - int minute = getPartDefault(PART_MINUTE); - return year+"-"+padZero(month)+"-"+padZero(day)+" "+padZero(hour)+":"+padZero(minute); + return year+"-"+padZero(month)+"-"+padZero(day)+" "+formatTime(); } if(scheme==SCHEME_YQ){ int quarter = expectPart(PART_QUARTER); @@ -296,7 +294,11 @@ throw new Error("!"); } - + public String formatTime() { + int hour = expectPart(PART_HOUR); + int minute = getPartDefault(PART_MINUTE); + return padZero(hour)+":"+padZero(minute); + } final Scheme scheme; final int[] parts; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn