Handle day-of-week substrings #159

Closed
GoogleCodeExporter opened this Issue Mar 15, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@GoogleCodeExporter
This was originally found when moving the tests to .NET 4, but it's an existing 
bug. Any culture which has one day-of-week string which is a leading substring 
of another later one will fail to parse the longer one correctly. This problem 
may only affect Turkey - hard to say for sure.

We should have a test for this which doesn't depend on real-world cultures.

Original issue reported on code.google.com by jonathan.skeet on 14 Dec 2012 at 4:45

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

The change that fixes this also fixes a problem shown up by moving to .NET 4, 
whereby for cultures which don't use the ISO calendar, we were formatting in 
Noda Time from an ISO LocalDate, but using the culture-specific calendar for 
BCL formatting, just with the same numeric values. This failed for day-of-week 
names, as the day of the week depends on the "real" date - two dates with the 
same year/month/day but in different calendars will often have different days 
of the week.

Original comment by jonathan.skeet on 14 Dec 2012 at 5:13

The change that fixes this also fixes a problem shown up by moving to .NET 4, 
whereby for cultures which don't use the ISO calendar, we were formatting in 
Noda Time from an ISO LocalDate, but using the culture-specific calendar for 
BCL formatting, just with the same numeric values. This failed for day-of-week 
names, as the day of the week depends on the "real" date - two dates with the 
same year/month/day but in different calendars will often have different days 
of the week.

Original comment by jonathan.skeet on 14 Dec 2012 at 5:13

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

Fixed by revision 59225b49214f.

Original comment by jonathan.skeet on 14 Dec 2012 at 5:13

Fixed by revision 59225b49214f.

Original comment by jonathan.skeet on 14 Dec 2012 at 5:13

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

Original comment by jonathan.skeet on 14 Dec 2012 at 5:13

  • Changed state: Fixed

Original comment by jonathan.skeet on 14 Dec 2012 at 5:13

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

For clarity: comment 1 refers only to problems in _tests_, from what I can see.

Original comment by malcolm.rowe on 15 Dec 2012 at 9:54

For clarity: comment 1 refers only to problems in _tests_, from what I can see.

Original comment by malcolm.rowe on 15 Dec 2012 at 9:54

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

Original comment by malcolm.rowe on 30 Jan 2013 at 11:18

  • Added labels: Milestone-1.1.0

Original comment by malcolm.rowe on 30 Jan 2013 at 11:18

  • Added labels: Milestone-1.1.0

@malcolmr malcolmr added the bug label Mar 15, 2015

@malcolmr malcolmr modified the milestone: 1.1.0 Mar 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment