pooleworks / datejs Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/datejs
Automatically exported from code.google.com/p/datejs
"2 week t" returns "+2week"; "2 week" returns "today"
What version of the product are you using? On what operating system?
Firefox 2, OS X 10.5.1
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 8:39
What steps will reproduce the problem?
1. Type in Date.today().getTimezone()
2. Returns null instead of "PST"
What is the expected output? What do you see instead?
It should say "PST" for my specific timezone. It always returns null though
with whatever date I give it.
What version of the product are you using? On what operating system?
Alpha-1. Using Firefox 2.0.0.11 on Mac OS X Leopard. Same problem in Safari
3.0.
Original issue reported on code.google.com by [email protected]
on 3 Dec 2007 at 5:25
What steps will reproduce the problem?
1. Type "monday +2week"
What is the expected output? What do you see instead?
Expected output: ideally, two weeks from the following monday (although
given a previous issue I've raised, even "monday" or "+2week" would be
*more* expected; "+2 days" is just bizarre.
What version of the product are you using? On what operating system?
Firefox 2, OS X 10.5.1
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 8:35
Seems to be a problem in .parseExact() somewhere, or maybe it's in
Parser.finishExact. For example...
// returns null
Date.parseExact("November 2007", ["MMMM d", "MMMM yyyy"]);
// Switch the format order, and a valid date is returned
Date.parseExact("November 2007", ["MMMM yyyy", "MMMM d"]);
Original issue reported on code.google.com by geoff%[email protected]
on 26 Nov 2007 at 6:10
What steps will reproduce the problem?
1. Type "saturday"
What is the expected output? What do you see instead?
Expected: A similar result to "monday", "friday", etc.
What version of the product are you using? On what operating system?
Firefox 2, OS X 10.5.1
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 8:40
What steps will reproduce the problem?
1. Type "december 9 at 9am"
What is the expected output? What do you see instead?
You will see: Saturday, December 01, 2007 9:00:00 AM
Should be: Sunday, December 09, 2007 9:00:00 AM
What version of the product are you using? On what operating system?
Alpha 1. Firefox
Please provide any additional information below.
Otherwise -- great script! Thanks
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 2:19
The parser does not accept 3 (or more) character math numbers.
Example
Date.parse('+100'); // fail
Original issue reported on code.google.com by geoff%[email protected]
on 29 Nov 2007 at 12:22
What steps will reproduce the problem?
1. type "+2 weeks"
What is the expected output? What do you see instead?
Expect the date two weeks from now; get an error instead. ("+2 years" works.)
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 8:31
What steps will reproduce the problem?
1. Type in 05/11/07 to the test textbox
2.
3.
What is the expected output? What do you see instead?
In the USA you would expect to see this resolved as 11th May (which is what
is displayed) but in Europe you would expect to see 5th November.
If you type in 23/11/07 this is correctly interpreted as 23rd November - so
where there is no ambiguity - there is no problem.
Would it be possible to use system information from the browser to correct
this?
What version of the product are you using? On what operating system?
Current test screen running in up to date FireFox
Please provide any additional information below.
Otherwise it all looks brilliant
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 4:21
Date.parse("yesterday week").equals(Date.parse("next week")); //
[PASS]which is not good
The following should pass...
Date.parse("yesterday week").equals(Date.parse("next week").add(-1).day());
// currently fails
This is a bit of known issue when combining Relative dates ("tomorrow")
with date math ("+week"). One hand is not talking to the other.
A fix is planned and should be available in the next release (Beta 1) of
the Parser.
Original issue reported on code.google.com by geoff%[email protected]
on 27 Nov 2007 at 10:36
Provide base CultureInfo file for all cultures.
At least 150+ individual cultures will be provided.
Some of the CultureInfo.regexPatterns section will have to be customized by
hand for each culture.
Original issue reported on code.google.com by geoff%[email protected]
on 12 Nov 2007 at 2:04
Specifying "next [some day]" or "last [some day]" behaves as expected, but
specifying "[some day]" on it's own gives you the *nearest* [some day], so
the behaviour will vary depending on the day of the week. (Typing "monday"
today gives me "last monday", but typing "monday" on Friday will give me
"next monday".)
What is the expected output? What do you see instead?
Personally, I'd expect it to always default to "next [some day]", but that
relies on local convention -- for other people "nearest [some day]" or"last
[some day]" may be the expected behaviour. (I trust you realise that a
*huge* subset of this problem area requires strong AI? :)
What version of the product are you using? On what operating system?
Firefox 2, OS X 10.5.1
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 8:45
Date.parseExact('July 2004', 'MMMM yyyy') // [FAIL]
Improperly returns null.
Same problem when using four character day specifier ('dddd') in .parseExact().
Original issue reported on code.google.com by geoff%[email protected]
on 12 Nov 2007 at 12:46
Date.parse('12 pm') returns 24 to the hour validator and fails.
It should return 12 (noon) of today.
Original issue reported on code.google.com by geoff%[email protected]
on 28 Nov 2007 at 2:00
Example: Date.parse('31')
If month does not have 31 days, the Parser is correcting to the last day of
the month. A RangeError should be thrown.
See /test/partial/.
The core throws a RangeError.
Example:
try {
new Date(2007, 10, 5).set( { day: 31 } )
}
catch(ex) {
console.log(ex)
}
[FIXED] Moved Type checking and RangeError checks into validate*() functions.
Reworked .add() and .set() functions. There were problems with '0' being
dealt with as a null value.
Original issue reported on code.google.com by geoff%[email protected]
on 12 Nov 2007 at 2:02
Within Firebug, "Break on All Errors" must be enabled.
Within Firebug try the following...
Date.parse('asdf')
Firebug jumps into the debugger and returns this.message and 's' as undefined.
Line 11:
Exception: function(s) {
this.message = "Parse error at '" + s.substring(0,10) + " ...'";
}
[FIXED] Returned null within Parser.finish if the Array length is 0.
Original issue reported on code.google.com by geoff%[email protected]
on 12 Nov 2007 at 2:03
I think there is a logic error in the parser with two digit years.
The CultureInfo.twoDigitYearMax will return a four digit year. The year
Translator will always return true.
year: function(s) {
return function() {
var n = Number(s);
this.year = (( s.length > 2 ) ? n :
(n + ( ( n < Date.CultureInfo.twoDigitYearMax ) ? 2000 : 1900 )));
};
},
Original issue reported on code.google.com by geoff%[email protected]
on 12 Nov 2007 at 2:00
What steps will reproduce the problem?
1. Run the following in Firebug, <code>Date.parse('asdf')</code>
2. Firebug jumps into debugger and shows variable 's' as undefined.
A return value of Null is expected when the supplied string cannot be
parsed into a Date object.
Test available online at http://www.datejs.com/test/core/. Must be using
FireFox.
Error happens on any parse failure.
Example
Date.parse()
Date.parse('')
Date.parse('asdf')
Date.parse(null)
Original issue reported on code.google.com by geoff%[email protected]
on 12 Nov 2007 at 2:01
If you parse just a valid day name (friday, monday, etc), the parser always
returns today's date.
Date.parse('friday') // returns today
Date.parse('monday') // returns today
Parsing month names works as expected.
Date.parse('march') // returns 1st of March
Original issue reported on code.google.com by geoff%[email protected]
on 13 Nov 2007 at 8:54
What steps will reproduce the problem?
1. type "day after tomorrow"
What is the expected output? What do you see instead?
Expect equivalent to "+2 days"; get equivalent of "+1 day"
What version of the product are you using? On what operating system?
Firefox 2, OS X 10.5.1
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 8:33
Safari 2's implementation of Date#setDate uses a signed byte integer which
means large values will get 'rolled over' and return an incorrect value
unless the add/subtracts are called in increments. The following link
details this bug which affects the addition methods that use setDate. This
issue does not affect Safari 3.
http://brianary.blogspot.com/2006/03/safari-date-bug.html
I tested using the version installed at http://www.datejs.com/
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 2:59
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.