Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
get-date-format
Advanced tools
Module that extracts date format out of sample of dates
If you have sources of the data with inconsistent date formats, usually it is required to figure out date format of each data set before doing any analysis with the data. This module is trying to solve that issue by extracting date format from the array of the dates. The more elements are in the array, the more accurate is the prediction. 13 consecutive days are enough for accurate prediction of the date format.
This module can detect all official date formats of all the countries represented here https://en.wikipedia.org/wiki/Date_format_by_country
Example usage:
const getDateFormat = require('get-date-format')
// or
// import getDateFormat from 'get-date-format'
const sampleOfDates = ['2017-01-01', '2017-03-11', '2017-03-13', '2017-12-12']
const dateFormat = getDateFormat(sampleOfDates)
console.log(dateFormat)
// YYYY-MM-DD
If date format can't be extracted, function is returning null
const getDateFormat = require('get-date-format')
// or
// import getDateFormat from 'get-date-format'
const sampleOfDates = ['some text', 'more text']
const dateFormat = getDateFormat(sampleOfDates)
console.log(dateFormat)
// null
TODO
FAQs
Module that tries to get the date format out of sample of dates
The npm package get-date-format receives a total of 33 weekly downloads. As such, get-date-format popularity was classified as not popular.
We found that get-date-format demonstrated a not healthy version release cadence and project activity because the last version was released 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.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.