Seems a quick RTFM is in order here. Please note the following:
$expiration_obj = expire_date( 'microsoft.com' );
$expiration_str = expire_date( 'microsoft.com', '%Y-%m-%d' );
$expiration_obj = expdate_int( $whois_text, 'com' );
$expiration_str = expdate_fmt( $whois_text, 'ru', '%Y-%m-%d'
+);
This works fine:
# perl -MNet::Domain::ExpireDate -e 'print expire_date("microsoft.com"
+,"%Y-%m-%d"),"\n"'
2021-05-03
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net;
Blog: http://blog.berghold.net Warning: No political correctness allowed.