We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
birth_date
age_over_NN
org.iso.18013.5.1
1 parent 0160c1d commit facf6ebCopy full SHA for facf6eb
src/mdoc/model/Document.ts
@@ -89,7 +89,8 @@ export class Document {
89
90
for (const [key, value] of Object.entries(values)) {
91
addAttribute(key, value);
92
- if (key === 'birth_date') {
+
93
+ if (key === 'birth_date' && namespace === DEFAULT_NS) {
94
const ageInYears = getAgeInYears(value);
95
addAttribute('age_over_21', ageInYears >= 21);
96
addAttribute(`age_over_${Math.floor(ageInYears)}`, true);
0 commit comments