Closed robertbastian closed 2 weeks ago
The names of the FieldLength enum variants predate my time working on this crate. I assume they were chosen to reflect the primary use case for those widths, even if they mean different things in different contexts
I've found several bugs:
FieldLength::TwoDigit
truncates the number, which is incorrect. Only theyy
andYY
patterns require truncation. I've moved this code to the year branch, and renamed the variantTwo
c..cc
ande..ee
require locale-sensitive day-of-week-number calculations, so they are now rejected during data loadingFieldLength::{Abbreviated, Wide, Narrow}
also apply to numeric fields, where they mean 3, 4, 5. I renamed them and updated documentation.