Open karladler opened 4 years ago
PR welcome.
Isn't EAN
a single type of GTIN
more precisely GTIN-13
?
EAN is actually a type of gtin. Reference https://www.gtin.info/
Hi, I want to work on this issue, right now only validation is available for 8,13, 14 digit code. We should add now for 12 digit code to satisfy all GTIN validations, and also where we validate the the given GTIN we need to use 3 for odd and 1 for even irrespective of length, but i saw in this function getPositionWeightThroughLengthAndIndex for 13 digit code it's reversed why?. Here is the reference to this https://en.wikipedia.org/wiki/International_Article_Number#:~:text=Numbering%20the%20positions%20from%20the%20right%20(code%20aligned%20to%20the%20right)%2C%20the%20odd%20data%20digits%20are%20always%20weight%20of%203%20and%20the%20even%20data%20digits%20are%20always%20weight%20of%201%2C%20regardless%20of%20the%20length%20of%20the%20code.
Let me know if i went wrong somewhere. Thanks
As I see it the term
EAN
is gradually being deprecated in favour of GTIN, maybe we can add it as an alias for EAN?