Fixed issue with SSN
This commit is contained in:
@@ -48,6 +48,7 @@ export interface EmployeesData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mapResponseToSsn(ssn: string): string {
|
function mapResponseToSsn(ssn: string): string {
|
||||||
|
ssn = ssn.replaceAll('-', '');
|
||||||
if (ssn.length === 10) {
|
if (ssn.length === 10) {
|
||||||
const century = +CURRENT_YEAR - +ssn.slice(0, 2) > 0 ? '20' : '19';
|
const century = +CURRENT_YEAR - +ssn.slice(0, 2) > 0 ? '20' : '19';
|
||||||
ssn = ssn.padStart(12, century);
|
ssn = ssn.padStart(12, century);
|
||||||
|
|||||||
Reference in New Issue
Block a user