mirror of
https://github.com/jakejarvis/rdapper.git
synced 2026-09-23 01:25:31 -04:00
Enhance date parsing in WHOIS and add tests for registrar expiration dates
Updated the `toISO` function to handle various timezone formats in WHOIS date strings. Added tests to verify parsing of registrar registration expiration dates and EDUCAUSE format dates in the normalization process. This improves the accuracy of date handling in WHOIS responses.
This commit is contained in:
@@ -31,17 +31,29 @@ export function normalizeWhois(
|
||||
"domain create date",
|
||||
"created",
|
||||
"registered",
|
||||
// EDUCAUSE (.edu)
|
||||
"domain record activated",
|
||||
]);
|
||||
const updatedDate = anyValue(map, [
|
||||
"updated date",
|
||||
"last updated",
|
||||
"last modified",
|
||||
"modified",
|
||||
// EDUCAUSE (.edu)
|
||||
"domain record last updated",
|
||||
]);
|
||||
const expirationDate = anyValue(map, [
|
||||
"registry expiry date",
|
||||
"registry expiration date",
|
||||
"expiry date",
|
||||
"expiration date",
|
||||
// Registrar-side synonyms commonly seen after referrals
|
||||
"registrar registration expiration date",
|
||||
"registrar registration expiry date",
|
||||
"registrar expiration date",
|
||||
"registrar expiry date",
|
||||
// EDUCAUSE (.edu)
|
||||
"domain expires",
|
||||
"paid-till",
|
||||
"expires on",
|
||||
"renewal date",
|
||||
|
||||
Reference in New Issue
Block a user