Re: dd/mm/yyyy Date Compare Problem
- From: "Matt Kruse" <newsgroups@xxxxxxxxxxxxx>
- Date: Sun, 30 Apr 2006 09:26:12 -0500
Dr John Stockton wrote:
I did mean that the de-*er would be distributed, for example on a web
page; then the material could be sent in full from library author to
each Web programmer, who could retail a full-glory reference copy but
use in pages the reduced version.
I don't see the difference - both the full version and the compacted version
are available on my site. A developer could download the full version for
reference and the compacted version for production. That's the intent, at
least :)
Date.dayAbbreviations = newAdd a Sunday at the end of the week, and you can match ISO 8601 too!
Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
This array is only useful when getting the index from getDay(), so adding
another 'Sun' at the end would be pointless.
I have heard that there is or has been a browser which, at least in
1900..2099, has getYear() returning Year%100, for which that fails.
Which browser? That's a broken implementation of getYear() anyway, so anyone
using such a browser surely has other issues ;)
There's no need to evaluate Leapness unless it's Feb 29. Feb <29 is
always good; Feb >29 always bad.
Valid point.
// Add an amount of time to a date. Negative numbers can be passed toHowever, the amount of time actually added can depend on the date;
subtract time.
Years and Feb vary in length by a day, and days can vary by an hour.
This is true, but the result should meet expectations. Some time units are
not absolute, like month and year. Yet adding a year to 1/1/X should always
result in 1/1/(x+1) regardless of how much time that period actually
contained.
Date.prototype.add = function(interval, number) {I think you are adding a number of WORKING days, stepwise.
else if (interval=='w') { // Weekday
Weekday = Mon-Fri, no? "Working day" has the same meaning to most, but not
all. Perhaps the same is true of "weekday"?
You have support for FIPS/ISO elsewhere?
Depends on what you mean, exactly. The functions parse/format functions are
intended to be independent of any specific standard or locale.
Thanks for your feedback.
--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
.
- References:
- dd/mm/yyyy Date Compare Problem
- From: Assimalyst
- Re: dd/mm/yyyy Date Compare Problem
- From: Matt Kruse
- Re: dd/mm/yyyy Date Compare Problem
- From: Dr John Stockton
- Re: dd/mm/yyyy Date Compare Problem
- From: Matt Kruse
- Re: dd/mm/yyyy Date Compare Problem
- From: Dr John Stockton
- dd/mm/yyyy Date Compare Problem
- Prev by Date: Re: Two JS questions
- Next by Date: Re: Cookie problem! Getting error when passing the expire date.
- Previous by thread: Re: dd/mm/yyyy Date Compare Problem
- Next by thread: Re: dd/mm/yyyy Date Compare Problem
- Index(es):