numpy / numpy/numpydoc

numpydoc

Open
#694 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Description

/**

  • Normalizes identity information and verifies layout attributes.
  • @param {Object} inputData - Raw profile details from form/OCR text.
  • @returns {Object} Cleaned document payload object.
    */
    function processIdentityPayload(inputData) {
    const { name, nrc, dobString } = inputData;

// Convert DD.MM.YYYY structure into an engine-readable format (YYYY-MM-DD)
const [day, month, year] = dobString.split('.');
const formattedDob = ${year}-${month}-${day};

// Dynamic Age Calculation
const birthDate = new Date(formattedDob);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDifference = today.getMonth() - birthDate.getMonth();

if (monthDifference < 0 || (monthDifference === 0 && today.getDate() < birthDate.getDate())) {
age--;
}

return {
name: name.trim(),
nrc_serial: nrc.toUpperCase().replace(/\s+/g, ''),
date_of_birth_iso: formattedDob,
current_age: age,
processed_at: new Date().toISOString()
};
}

// Execution Instance
const rawInput = {
name: "Moe Lwin Tun",
nrc: "12/magada(n)150506",
dobString: "20.08.1997"
};

const payload = processIdentityPayload(rawInput);
console.log("Processed API Payload:", JSON.stringify(payload, null, 2));
{
"status": "success",
"documentType": "MYANMAR_NRC",
"extractedFields": {
"fullName": "Moe Lwin Tun",
"nrcNumber": "12/MAGADA(N)150506",
"dateOfBirth": "1997-08-20",
"calculatedAge": 28,
"isVerified": true
}
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue body contains a JavaScript identity-processing example but does not identify a numpydoc file, test, or requested change. First clarify what should be changed in numpydoc and locate the relevant entry point or documentation test. Completion criteria cannot be defined until the intended scope is stated.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.