Skip to content

Commit

Permalink
feat(gs1): HarvestDate Application Identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
stonelasley committed Dec 3, 2021
1 parent 3e8029e commit 270845a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/__tests__/readers/gs-1.reader.spec.ts
Expand Up @@ -242,6 +242,12 @@ describe('Gs1Reader', () => {
String.fromCharCode(29),
),
);
const actual4 = classUnderTest.decode(
']C102084135560009503703 700720211024'.replace(
' ',
String.fromCharCode(29),
),
);

expect(actual.values).toContainEqual({
code: '21',
Expand Down Expand Up @@ -284,5 +290,15 @@ describe('Gs1Reader', () => {
code: '10',
value: 'ES003472002',
});

expect(actual4.values).toContainEqual({
code: '02',
value: '08413556000950',
});
expect(actual4.values).toContainEqual({ code: '37', value: '03' });
expect(actual4.values).toContainEqual({
code: '7007',
value: '20211024',
});
});
});
1 change: 1 addition & 0 deletions src/enums/ai-code.ts
Expand Up @@ -98,6 +98,7 @@ export enum AICode {
UNECEMeatCarcassesAndCutsClassification = '7002',
ExpirationDateAndTime = '7003',
ActivePotency = '7004',
HarvestDate = '7007',
Processorapproval = '703n',
RollProductsWidthLengthCoreDiameterDirectionSplices = '8001',
MobilePhoneIdentifier = '8002',
Expand Down
6 changes: 6 additions & 0 deletions src/models/application-identifiers.ts
Expand Up @@ -651,6 +651,12 @@ const data = [
length: 4,
variableLength: true,
},
{
code: AICode.HarvestDate,
description: 'Harvest Date',
length: 12,
variableLength: true,
},
{
code: AICode.Processorapproval,
description: 'Processor approval',
Expand Down

0 comments on commit 270845a

Please sign in to comment.