Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hypersoftllc/qc-immutable_date
An immutable version of a JavaScript Date.
https://github.com/hypersoftllc/qc-immutable_date
immutable
Last synced: about 1 month ago
JSON representation
An immutable version of a JavaScript Date.
- Host: GitHub
- URL: https://github.com/hypersoftllc/qc-immutable_date
- Owner: hypersoftllc
- License: isc
- Created: 2017-05-11T19:37:06.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2017-06-02T23:14:24.000Z (over 7 years ago)
- Last Synced: 2024-12-21T15:42:42.974Z (about 2 months ago)
- Topics: immutable
- Language: TypeScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qc-immutable_date
[![Build Status][travis-svg]][travis-url]
[![Coverage Status][coverage-image]][coverage-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url][![npm badge][npm-badge-png]][package-url]
An immutable version of a JavaScript Date.
## Installation
```sh
npm install --save qc-immutable_date
```## Example Usage
```js
import { ImmutableDate } from 'qc-immutable_date';let d1 = new Date(946684800000); // Date on 2000-01-01T00:00:00.000 UTC
let id1 = new ImmutableDate(d1);
let id2 = id1.setFullYear(2010); // id1 is still in 2000
let d2 = id2.toDate(); // Date on 2010-01-01T00:00:00.000 UTC
```[coverage-image]: https://coveralls.io/repos/github/hypersoftllc/qc-immutable_date/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/hypersoftllc/qc-immutable_date?branch=master
[downloads-image]: http://img.shields.io/npm/dm/qc-immutable_date.svg
[downloads-url]: http://npm-stat.com/charts.html?package=qc-immutable_date
[license-image]: http://img.shields.io/npm/l/qc-immutable_date.svg
[license-url]: LICENSE
[package-url]: https://npmjs.org/package/qc-immutable_date
[npm-badge-png]: https://nodei.co/npm/qc-immutable_date.png?downloads=true&stars=true
[travis-svg]: https://travis-ci.org/hypersoftllc/qc-immutable_date.svg?branch=master
[travis-url]: https://travis-ci.org/hypersoftllc/qc-immutable_date