summaryrefslogtreecommitdiff
path: root/south-african-id-parser.js
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-06-11 22:47:41 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-06-11 22:47:41 +0200
commit99ec25bbb6f410ae33f09ee75ae005f5ffcdffcf (patch)
tree6323ba1ad05d7addf115dd5f6148e625b690ef59 /south-african-id-parser.js
parentbe8d25968bfa511aa856759f6fbe9dfa5c8248f6 (diff)
Update the docs which incorrectly had a 1-indexed month
Diffstat (limited to 'south-african-id-parser.js')
-rw-r--r--south-african-id-parser.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/south-african-id-parser.js b/south-african-id-parser.js
index 62f5e15..983647a 100644
--- a/south-african-id-parser.js
+++ b/south-african-id-parser.js
@@ -52,7 +52,7 @@
* var info = saIdParser.parse(validIdNumber);
* // info === {
* // isValid: true,
- * // dateOfBirth: new Date(1990, 01, 04),
+ * // dateOfBirth: new Date(1990, 0, 4),
* // isMale: true,
* // isFemale: false,
* // isSouthAfricanCitizen: true
@@ -103,6 +103,9 @@
* December 2015. If, on the other hand, the date of birth is parsed as 11
* December 15, that will be interpreted as 10 December 1915.
*
+ * The date will be in the local timezone, with the time portion set to
+ * midnight.
+ *
* @function
* @param {string} idNumber - The ID number to be parsed.
* @return {?Date} The date of birth from the ID number, or undefined if the
@@ -114,7 +117,7 @@
* var validIdNumber = '9001049818080';
* var dateOfBirth = saIdParser.parseDateOfBirth(validIdNumber);
*
- * // dateOfBirth === new Date(1990, 01, 04)
+ * // dateOfBirth === new Date(1990, 0, 4)
*/
parseDateOfBirth: parseDateOfBirth,