I believe that days and months get numbered from 0 to 6 (=7) & 0 to 11 (=12) for months, in js. >From: Paul Hastings <paul.hastings at gmail.com> >Reply-To: "[JavaScript List]" <javascript at LaTech.edu> >To: javascript at LaTech.edu >Subject: [Javascript] bizzarre getDay() behavior >Date: Fri, 8 Oct 2004 10:20:57 +0700 > >i've built a clock using > >Date.prototype.format = dateFormat; > >to build my own i18n formatting functionality. and then use it like: > >var d = new Date(); >document.all["dateTimeObject"].innerHTML = d.format(i18nDTFormat); > >however this.getDay() within that dateFormat function keeps returning >0 (sunday) no matter the date--i use that to lookup a localized day >name from an array. at the sametime, i get the correct time bits back >using this.getMinutes(), this.getHours(), etc. in that same function. > >any ideas? > >thanks. >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail