{"id":24079898,"url":"https://github.com/hypersoftllc/qc-to_immutable_date","last_synced_at":"2026-06-14T15:37:56.848Z","repository":{"id":65481595,"uuid":"91840687","full_name":"hypersoftllc/qc-to_immutable_date","owner":"hypersoftllc","description":"A simple JavaScript utility to convert various values to an ImmutableDate.","archived":false,"fork":false,"pushed_at":"2017-09-12T16:40:13.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T01:16:30.386Z","etag":null,"topics":["javascript-utility"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hypersoftllc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-19T19:54:11.000Z","updated_at":"2017-09-12T16:47:20.000Z","dependencies_parsed_at":"2023-01-25T10:05:11.388Z","dependency_job_id":null,"html_url":"https://github.com/hypersoftllc/qc-to_immutable_date","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersoftllc%2Fqc-to_immutable_date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersoftllc%2Fqc-to_immutable_date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersoftllc%2Fqc-to_immutable_date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersoftllc%2Fqc-to_immutable_date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypersoftllc","download_url":"https://codeload.github.com/hypersoftllc/qc-to_immutable_date/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240953061,"owners_count":19884022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-utility"],"created_at":"2025-01-09T22:26:23.654Z","updated_at":"2026-06-14T15:37:56.793Z","avatar_url":"https://github.com/hypersoftllc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qc-to_immutable_date\r\n\r\n[![Build Status][travis-svg]][travis-url]\r\n[![Coverage Status][coverage-image]][coverage-url]\r\n[![License][license-image]][license-url]\r\n[![Downloads][downloads-image]][downloads-url]\r\n\r\n[![npm badge][npm-badge-png]][package-url]\r\n\r\nA simple JavaScript utility to convert various values to an `ImmutableDate`.\r\n\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install --save qc-to_immutable_date\r\n```\r\n\r\nor\r\n\r\n```sh\r\nyarn add qc-to_immutable_date\r\n```\r\n\r\n\r\n## Example Usage\r\n\r\n```js\r\nimport { toImmutableDate, toImmutableDateOrNull } from 'qc-to_immutable_date';\r\n\r\ntoImmutableDate(946684800000);   // Date on 2000-01-01T00:00:00.000 UTC\r\ntoImmutableDate(new Date());     // The Date input\r\n\r\n// Returns the Date created from the number returned from `toDate`.\r\ntoImmutableDate({ toDate() { return 946684800000; } });\r\n\r\n// Returns the Date returned from `toDate`.\r\ntoImmutableDate({ toDate() { return new Date(); } });\r\n\r\ntoImmutableDate(\u003cnot-date-like\u003e);                   // The not-date-like input\r\ntoImmutableDate(\u003cnot-date-like\u003e, undefined);        // The not-date-like input\r\ntoImmutableDate(\u003cnot-date-like\u003e, null);             // `null`\r\ntoImmutableDate(\u003cnot-date-like\u003e, 0);                // `0`\r\ntoImmutableDate(\u003cnot-date-like\u003e, new Date());       // The new Date\r\ntoImmutableDate(\u003cnot-date-like\u003e, { def: {...} });   // The `{...}` object\r\ntoImmutableDateOrNull(\u003cnot-date-like\u003e);             // `null`\r\ntoImmutableDateOrNull(\u003cdate-like\u003e);                 // The Date\r\n```\r\n\r\n\r\n[coverage-image]: https://coveralls.io/repos/github/hypersoftllc/qc-to_immutable_date/badge.svg?branch=master\r\n[coverage-url]: https://coveralls.io/github/hypersoftllc/qc-to_immutable_date?branch=master\r\n[downloads-image]: http://img.shields.io/npm/dm/qc-to_immutable_date.svg\r\n[downloads-url]: http://npm-stat.com/charts.html?package=qc-to_immutable_date\r\n[license-image]: http://img.shields.io/npm/l/qc-to_immutable_date.svg\r\n[license-url]: LICENSE\r\n[package-url]: https://npmjs.org/package/qc-to_immutable_date\r\n[npm-badge-png]: https://nodei.co/npm/qc-to_immutable_date.png?downloads=true\u0026stars=true\r\n[travis-svg]: https://travis-ci.org/hypersoftllc/qc-to_immutable_date.svg?branch=master\r\n[travis-url]: https://travis-ci.org/hypersoftllc/qc-to_immutable_date\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypersoftllc%2Fqc-to_immutable_date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypersoftllc%2Fqc-to_immutable_date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypersoftllc%2Fqc-to_immutable_date/lists"}