Giter Site home page Giter Site logo

datejs's People

Watchers

 avatar

datejs's Issues

[FIXED] Weird parser bug

"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

[FIXED] getTimezone

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

"monday +2week" equivalent to "+2days"

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

Order of formats in Date.parseExact()?

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

[FIXED] "saturday" returns Thursday Nov 1st.

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

[FIXED] Wrong parsing result

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

Date.parse('+100') fails

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

[INVALID] European date formats

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

"yesterday week" returns equivalent to "next week"

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

[FIXED] Stub out other CultureInfo files

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

[INVALID] Behaviour when typing a day name on its own is ambiguous

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

[FIXED] No RangeError if "day out of range"

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

[FIXED] this.message & 's' are 'undefined' with unparsable string

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

[FIXED] twoDigitYearMax is now a four digit number in CultureInfo file

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

[FIXED] 's' is undefined in Parser Exception when non-parsable string is passed to .parse()

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

[FIXED] Parsing DayName only always return 'today'

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

[FIXED] "day after tomorrow" returns "tomorrow"

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

Date additions unreliable in Safari 2

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.