# @segment/isodate

> Parse an ISO date string into a Date

Latest version **1.0.3** (published 2017-10-12) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @segment/isodate
pnpm add @segment/isodate
yarn add @segment/isodate
bun add @segment/isodate
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-10-12 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | separate (@types/segment__isodate) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Segment |
| Maintainers | dscrobonia, emilio-gomez-lavin, vdemedes, sahilp, segment-ulysse, erickimsegment, segment-andy-yeo, segment-maggie-chu, systemizer, n2parko, notfelineit, jlee9595, segment-danielstjules, sperand-io, albert.segment, tamarrow, ejcx, jeroenransijn, joeybloggs, mynameiskir, maxence-charriere, boggsboggs, codenameatlas, nettofarah, myclamm, wdr, fouad, achille-roussel, peripheral, calvinfo, dfuentes, anoonan, nielst, ladanazita, rbranson, jedwatson, srthurman, jgershen, ivolo, ccnixon, tidothegreat, emilyluckette, chrisbuttery, lambtron, thehydroimpulse, yields, reinpk, dominicbarnes, stevenmiller888, hanothan, tejasmanohar, rowno, stephenmathieson, segmentio, segment-admin |
| Keywords | date, isodate |

## Links

- npm: https://www.npmjs.com/package/@segment/isodate
- Repository: https://github.com/segmentio/isodate
- Homepage: https://github.com/segmentio/isodate#readme
- Issues: https://github.com/segmentio/isodate/issues
- npm.io page: https://npm.io/package/@segment/isodate

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-10-12
- 1.0.2 — 2016-05-12
- 1.0.0 — 2016-04-07
- 0.0.2 — 2016-04-07

## README

# isodate

[![CircleCI](https://circleci.com/gh/segmentio/isodate.svg?style=shield&circle-token=d49fc6469182ce8392a332106af7a5fb76b2f8b7)](https://circleci.com/gh/segmentio/isodate)
[![Codecov](https://img.shields.io/codecov/c/github/segmentio/isodate/master.svg?maxAge=2592000)](https://codecov.io/gh/segmentio/isodate)

Parse an ISO date string into a Date. Works cross-browser, even in the old, dumb ones ;)

## Installation

```sh
$ npm install @segment/isodate
```

## Example

```js
var isodate = require('isodate');

var date = isodate.parse('2013-09-04T00:57:26.434Z');
date.toISOString(); // "2013-09-04T00:57:26.434Z"
```

```js
var isodate = require('isodate');

isodate.is('2013-09-04T00:57:26.434Z'); // true
isodate.is('string'); // false
```

## API

### .parse(string)

Parse the given ISO date `string` into a native `Date` object.

### .is(string, strict)

Check if the given `string` is an ISO date string. `strict` mode will return false for strings without a year, month _and_ date; for example `2013` would be `false`.

---
_Source: https://npm.io/package/@segment/isodate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
