Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <2031344.OscmL0gD8O@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 02 May 2013 14:17:20 +0200 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <0073691b-8f9e-4b11-9431-7759339ed68b@googlegroups.com> <5064953.7cZPh7B9jv@PointedEars.de> MIME-Version: 1.0 Lines: 29 NNTP-Posting-Date: 02 May 2013 14:17:21 CEST NNTP-Posting-Host: e5ab9167.newsspool1.arcor-online.net X-Trace: DXC=D6RI;Pe?7QO2jYf>V4L0gLic==]BZ:afN4Fo<]lROoRAnkgeX?EC@@@0E8X5N4L0EBDZm8W4\YJNLNVB`iD`M0TJE;jX_iLCNIN=iSFajFBHeI X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:19577 Bart Van der Donck wrote: > Thomas 'PointedEars' Lahn wrote: >> Bart Van der Donck wrote: >>> var d = new Date(); >>> alert( d.getFullYear() >>> + '/' >>> + ('0' + (1 + d.getMonth())).slice(-2) >>> + '/' >>> + ('0' + d.getDate()).slice(-2) >>> + ' ' >>> + ('0' + d.getHours()).slice(-2) >>> + ':' >>> + ('0' + d.getMinutes()).slice(-2) >>> ); >> >> Unfortunately, although that approach is quite elegant, >> calling String.prototype.slice() with negative arguments >> is not interoperable. > > There is no problem whatsoever to use 'slice()' with a negative number. None that you are aware of. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.