{"id":21879166,"url":"https://github.com/typpo/j2000","last_synced_at":"2025-03-22T00:16:14.924Z","repository":{"id":57278976,"uuid":"78228814","full_name":"typpo/j2000","owner":"typpo","description":"simple javascript functions for julian date/j2000 conversion","archived":false,"fork":false,"pushed_at":"2018-02-13T15:51:33.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T10:05:18.592Z","etag":null,"topics":["astronomy","time"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typpo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-06T18:26:52.000Z","updated_at":"2023-04-29T17:51:37.000Z","dependencies_parsed_at":"2022-09-11T18:51:23.214Z","dependency_job_id":null,"html_url":"https://github.com/typpo/j2000","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typpo%2Fj2000","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typpo%2Fj2000/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typpo%2Fj2000/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typpo%2Fj2000/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typpo","download_url":"https://codeload.github.com/typpo/j2000/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244885696,"owners_count":20526296,"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":["astronomy","time"],"created_at":"2024-11-28T08:15:28.404Z","updated_at":"2025-03-22T00:16:14.906Z","avatar_url":"https://github.com/typpo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"J2000 Time Converter\n---\n[![Build Status](https://travis-ci.org/typpo/j2000.svg?branch=master)](https://travis-ci.org/typpo/j2000)\n\nThis is a simple javascript converter between j2000, unix time, and javascript date formats.\n\nTo install: `npm install j2000`\n\n# Usage\n\n```javascript\nvar converter = require('j2000');\n\nvar unixTime = converter.j2000ToUnix(2457828.5);\n// unixTime = 949185759.316\n\nvar j2000Time = converter.unixToJ2000(949185759.316);\n// j2000Time = 2457828.5\n```\n\nYou can also convert Javascript dates:\n\n```javascript\nvar converter = require('j2000');\n\nvar april1st = new Date(2016, 3, 1);  // Note that Javascript months are 0-indexed\nvar j2000Time = converter.dateToJ2000(april1st);\n// j2000Time = 512766069.184\n\nvar myDate = converter.j2000ToDate(512766069.184);\n// \u003cDate Object\u003e 2016-04-01T07:00:00.000Z\n```\n\n## Bonus constant\n\nYou can get the number of leap seconds since the year 2000:\n\n```javascript\nvar leapsec = require('j2000').NUM_LEAP_SEC_SINCE_2000;\n```\n\n## Install from source\n\nCheck out this repository.  Then run `npm install` (or `yarn install`).\n\n## Run tests\n\n```\nnpm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyppo%2Fj2000","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyppo%2Fj2000","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyppo%2Fj2000/lists"}