Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
date-extractor helps you extract dates from text
pip3 install date-extractor
from date_extractor import extract_dates
text = "I arrived in that city on January 4, 1937"
dates = extract_dates(text)
# [datetime.datetime(1937, 1, 4, 0, 0, tzinfo=<UTC>)]
Date extractor also works on dates with hours, minutes and seconds:
from date_extractor import extract_date
date = extract_date("2018-06-07 16:31:54")
# datetime.datetime(2018, 6, 7, 16, 31, 54, tzinfo=<UTC>)
from date_extractor import extract_date
text = "I arrived in that city in 1937"
date, precision = extract_date(text, return_precision=True)
# precision = 'year'
Languages Supported |
---|
Arabic |
Chinese (incl. Taiwan) |
English |
French |
Sorani (Kurdish) |
Turkish |
To test the package run
python3 -m unittest date_extractor.tests.test
Contact Daniel Dufour at daniel.j.dufour@gmail.com
FAQs
Extract dates from text
We found that date-extractor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.