@hexagon6/ical-date-parse
v0.0.2
Published
You have ical data and want to parse dates in Javascript?
Readme
@hexagon6/ical-date-parse
You have ical data and want to parse dates in Javascript?
Use @hexagon6/ical-date-parse. parseDate takes a ical data string and gives back a javascript Date object.
Zero dependencies and fast due to regex pattern matching.
Installation
- npm:
npm install @hexagon6/ical-date-parse - yarn:
yarn add @hexagon6/ical-date-parse - pnpm:
pnpm install @hexagon6/ical-date-parse - bun:
bun install @hexagon6/ical-date-parse
Usage
import { parseDate } from '@hexagon6/ical-date-parse';
parseDate('20180923T141257Z')2018-09-23T14:12:57.000Z
Tests
There are some tests adapted from https://github.com/zxqx/ical-date-parser/blob/master/test/index.js .
Run with: npm run test:unit.
Inspiration
- https://github.com/zxqx/ical-date-parser/blob/master/src/index.js
- https://github.com/zxqx/ical-date-parser/blob/master/test/index.js
