Bug in Date>>readFrom:pattern: ? Pharo2.0
Hi, Date readFrom: '4.2.13' readStream pattern: 'd.m.yy' Does not return 4.2.2013 but 4.2.0013 The comment is saying "A year given using only two decimals is considered to be >2000" So, the comment is not ok or this is a bug? Sabine -- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hello Sabine probably a bug. If you can write some tests and publish them on the bugtracker this will help. If you provide the fix (it will be faster to get it fixed) please run the tests to make sure that we do not introduce side effects. Stef
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi, I created a bug, hoping that I filled out every field correctly. https://pharo.fogbugz.com/f/cases/11222/Date-readFrom-pattern-year-2-decimal... Sabine On Wed, Jul 24, 2013 at 9:52 AM, Stéphane Ducasse [via Smalltalk] <ml-node+s1294792n4700428h63@n4.nabble.com> wrote:
Hello Sabine probably a bug. If you can write some tests and publish them on the bugtracker this will help. If you provide the fix (it will be faster to get it fixed) please run the tests to make sure that we do not introduce side effects.
Stef
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
________________________________ If you reply to this email, your message will be added to the discussion below: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470042... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470044... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I also hate #yyyymmdd Date today yyyymmdd -> '2013-07-24' I would expect '20130724' Cheers, On Wed, Jul 24, 2013 at 5:59 AM, Sabine Knöfel <sabine.knoefel@gmail.com>wrote:
Hi,
I created a bug, hoping that I filled out every field correctly.
https://pharo.fogbugz.com/f/cases/11222/Date-readFrom-pattern-year-2-decimal...
Sabine
On Wed, Jul 24, 2013 at 9:52 AM, Stéphane Ducasse [via Smalltalk] <[hidden email] <http://user/SendEmail.jtp?type=node&node=4700443&i=0>> wrote:
Hello Sabine probably a bug. If you can write some tests and publish them on the bugtracker this will help. If you provide the fix (it will be faster to get it fixed) please run the tests to make sure that we do not introduce side effects.
Stef
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
________________________________ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470042...
To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
------------------------------ View this message in context: Re: Bug in Date>>readFrom:pattern: ? Pharo2.0<http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470044...>
Sent from the Pharo Smalltalk Users mailing list archive<http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
I agree The comment of yyyymmdd is saying "Format the date in ISO 8601 standard like '2002-10-22' The result is of fixed size 10 characters long.." so I would say the selector is not choosen very careful. There is a discussion in Fogbuz about >>readFrom:pattern: https://pharo.fogbugz.com/default.asp?11222 Sabine On Wed, Jul 24, 2013 at 2:56 PM, Mariano Martinez Peck [via Smalltalk] <ml-node+s1294792n4700533h18@n4.nabble.com> wrote:
I also hate #yyyymmdd
Date today yyyymmdd -> '2013-07-24'
I would expect '20130724'
Cheers,
On Wed, Jul 24, 2013 at 5:59 AM, Sabine Knöfel <[hidden email]> wrote:
Hi,
I created a bug, hoping that I filled out every field correctly.
https://pharo.fogbugz.com/f/cases/11222/Date-readFrom-pattern-year-2-decimal...
Sabine
On Wed, Jul 24, 2013 at 9:52 AM, Stéphane Ducasse [via Smalltalk] <[hidden email]> wrote:
Hello Sabine probably a bug. If you can write some tests and publish them on the bugtracker this will help. If you provide the fix (it will be faster to get it fixed) please run the tests to make sure that we do not introduce side effects.
Stef
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
________________________________ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470042... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
________________________________ View this message in context: Re: Bug in Date>>readFrom:pattern: ? Pharo2.0
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
________________________________ If you reply to this email, your message will be added to the discussion below: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470053... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470054... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I remember that once camillo suggested to use the same approach as in dart where you can specify a strategy.
I agree
The comment of yyyymmdd is saying "Format the date in ISO 8601 standard like '2002-10-22' The result is of fixed size 10 characters long.."
so I would say the selector is not choosen very careful.
There is a discussion in Fogbuz about >>readFrom:pattern: https://pharo.fogbugz.com/default.asp?11222
Sabine
On Wed, Jul 24, 2013 at 2:56 PM, Mariano Martinez Peck [via Smalltalk] <[hidden email]> wrote:
I also hate #yyyymmdd
Date today yyyymmdd -> '2013-07-24'
I would expect '20130724'
Cheers,
On Wed, Jul 24, 2013 at 5:59 AM, Sabine Knöfel <[hidden email]> wrote:
Hi,
I created a bug, hoping that I filled out every field correctly.
https://pharo.fogbugz.com/f/cases/11222/Date-readFrom-pattern-year-2-decimal...
Sabine
On Wed, Jul 24, 2013 at 9:52 AM, Stéphane Ducasse [via Smalltalk] <[hidden email]> wrote:
Hello Sabine probably a bug. If you can write some tests and publish them on the bugtracker this will help. If you provide the fix (it will be faster to get it fixed) please run the tests to make sure that we do not introduce side effects.
Stef
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
________________________________ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470042... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
________________________________ View this message in context: Re: Bug in Date>>readFrom:pattern: ? Pharo2.0
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
________________________________ If you reply to this email, your message will be added to the discussion below: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470053... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
View this message in context: Re: Bug in Date>>readFrom:pattern: ? Pharo2.0 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 24 Jul 2013, at 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I remember that once camillo suggested to use the same approach as in dart where you can specify a strategy.
The ZTimestamp package contains such an example-based parser/formatter (load from the config browser or from http://www.smalltalkhub.com/#!/~SvenVanCaekenberghe/Neo) that can do what you want and much more, like multi-language weeks/months, for formatting & parsing. ((ZTimestampFormat fromString: '3.2.01') createDate; parse: '4.2.13') = (Date newDay: 4 month: 2 year: 2013 ) It is based on how things are done in Go. Read the class docs & tests for more information. You could subclass ZTimestampFormat and override #parseYearTwoDigitsFrom: to fine-tune the behaviour of 2 digit year specifications. Sven
I agree
The comment of yyyymmdd is saying "Format the date in ISO 8601 standard like '2002-10-22' The result is of fixed size 10 characters long.."
so I would say the selector is not choosen very careful.
There is a discussion in Fogbuz about >>readFrom:pattern: https://pharo.fogbugz.com/default.asp?11222
Sabine
On Wed, Jul 24, 2013 at 2:56 PM, Mariano Martinez Peck [via Smalltalk] <[hidden email]> wrote:
I also hate #yyyymmdd
Date today yyyymmdd -> '2013-07-24'
I would expect '20130724'
Cheers,
On Wed, Jul 24, 2013 at 5:59 AM, Sabine Knöfel <[hidden email]> wrote:
Hi,
I created a bug, hoping that I filled out every field correctly.
https://pharo.fogbugz.com/f/cases/11222/Date-readFrom-pattern-year-2-decimal...
Sabine
On Wed, Jul 24, 2013 at 9:52 AM, Stéphane Ducasse [via Smalltalk] <[hidden email]> wrote:
Hello Sabine probably a bug. If you can write some tests and publish them on the bugtracker this will help. If you provide the fix (it will be faster to get it fixed) please run the tests to make sure that we do not introduce side effects.
Stef
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
________________________________ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470042... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
________________________________ View this message in context: Re: Bug in Date>>readFrom:pattern: ? Pharo2.0
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
________________________________ If you reply to this email, your message will be added to the discussion below: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p470053... To unsubscribe from Bug in Date>>readFrom:pattern: ? Pharo2.0, click here. NAML
View this message in context: Re: Bug in Date>>readFrom:pattern: ? Pharo2.0 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
It was already discussed and modified: https://pharo.fogbugz.com/default.asp?10869 Regards 2013/7/24 Sabine Knöfel <sabine.knoefel@gmail.com>
Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Jul 29, 2013, at 2:34 PM, José Comesaña <jose.comesana@gmail.com> wrote:
It was already discussed and modified: https://pharo.fogbugz.com/default.asp?10869
This one is just an open report⦠no action was done. I have merged it into Issue 11222 But there is a third issue about exactly the same, this I think is from you: 10870 Corrections to Date class >>readFrom:pattern: https://pharo.fogbugz.com/f/cases/10870
Regards
2013/7/24 Sabine Knöfel <sabine.knoefel@gmail.com> Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I think so. I think Stef created 10869 and I 10870. I had made the corrections and written the tests. Anyway, it is possible that I had made it bad. I thought I had commited the slice, but... If you tell me how, I will do it again. Regards 2013/7/29 Marcus Denker <marcus.denker@inria.fr>
On Jul 29, 2013, at 2:34 PM, José Comesaña <jose.comesana@gmail.com> wrote:
It was already discussed and modified: https://pharo.fogbugz.com/default.asp?10869
This one is just an open report⦠no action was done. I have merged it into Issue 11222
But there is a third issue about exactly the same, this I think is from you:
10870 Corrections to Date class >>readFrom:pattern: https://pharo.fogbugz.com/f/cases/10870
Regards
2013/7/24 Sabine Knöfel <sabine.knoefel@gmail.com> Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Jul 30, 2013, at 12:47 AM, José Comesaña <jose.comesana@gmail.com> wrote:
I think so. I think Stef created 10869 and I 10870. I had made the corrections and written the tests. Anyway, it is possible that I had made it bad. I thought I had commited the slice, but...
If you tell me how, I will do it again.
What we could do now is to merge you issue into the 11222 (it has a long discussion already). And then you can commit your code as a Slice for 11222 for the others there to check. Marcus
Regards
2013/7/29 Marcus Denker <marcus.denker@inria.fr>
On Jul 29, 2013, at 2:34 PM, José Comesaña <jose.comesana@gmail.com> wrote:
It was already discussed and modified: https://pharo.fogbugz.com/default.asp?10869
This one is just an open report⦠no action was done. I have merged it into Issue 11222
But there is a third issue about exactly the same, this I think is from you:
10870 Corrections to Date class >>readFrom:pattern: https://pharo.fogbugz.com/f/cases/10870
Regards
2013/7/24 Sabine Knöfel <sabine.knoefel@gmail.com> Hi,
Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'
Does not return 4.2.2013 but 4.2.0013
The comment is saying "A year given using only two decimals is considered to be >2000"
So, the comment is not ok or this is a bug?
Sabine
-- View this message in context: http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (6)
-
José Comesaña -
Marcus Denker -
Mariano Martinez Peck -
Sabine Knöfel -
Stéphane Ducasse -
Sven Van Caekenberghe