Socket
Book a DemoInstallSign in
Socket

simple-date-parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-date-parser

Simple JS Date parser

1.0.9
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

simple-date-parser

Simple JS Date parser

https://artik-man.github.io/simple-date-parser/

https://www.npmjs.com/package/simple-date-parser

npm install simple-date-parser

Accepts a string containing a date in human-readable format. Returns JS Date object

parseDate(date: string) => Date;

Using

import { parseDate } from './index.ts';
const date = parseDate('20 jan 2007 at 6:38');

Supported formats:

YYYYMMdd
d.MM.YYYY
d.M.YYYY
dd-MM-YYYY
d-M-YYYY
dd.MM.YYYY hh:mm
d.M.YYYY hh:mm
dd-MM-YYYY, hh:mm:ss
dd MMM YYYY at h:mm
dd MMM YYYY at h:mm:ss
dd MMM YYYY at h:mm a
dd MMM YYYY at h:mm:ss a
dd MMM YYYY, hh:mm
dd-MMMM-YYYY, hh:mm
d MMM YYYY, hh:mm
dd MMM YYYY
d MMM YYYY
d MMM, YYYY
d MMM, YYYY - hh:mm
d MMM, YYYY - hh:mm a
d MMM, YYYY - hh:mm:ss
d MMM, YYYY - hh:mm:ss a
MMM dd, YYYY, hh:mm:ss
MMM dd, YYYY, hh:mm:ss a
MMM dd, YYYY, hh:mm
MMM dd, YYYY, hh:mm a
MMM dd, YYYY
MMM dd, YYYY at h:mm a
YYYY-MM-dd
YYYY-MM-dd hh:mm
YYYY-MM-dd hh:mm a
YYYY-MM-dd hh:mm:ss
Сегодня, hh:mm
today at h:mm a
today at h:mm:ss a
Вчера, hh:mm
yesterday at h:mm a
yesterday at h:mm:ss a

Keywords

date

FAQs

Package last updated on 20 Apr 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.