npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

galaxy-time

v1.0.16

Published

galaxy-time ====== ![npm](https://img.shields.io/npm/v/galaxy-time)

Downloads

3

Readme

galaxy-time

npm

根据经纬度坐标查询天文时间和银河最佳观测时间

可用方法

查询天文时间

SunCalc.getTimes(/*日期*/ date, /*纬度*/ latitude, /*经度*/ longitude)

返回一个具有以下属性的对象(每个都是一个“Date”对象):

| 属性 | 描述 | | --------------- | ------------------------------------------------------------------------ | | sunrise | 日出(太阳的顶端出现在地平线上)| | | sunriseEnd | 日出结束(太阳的底部边缘触到地平线) | | goldenHourEnd | 清晨黄金时间(柔和的光线,拍摄的最佳时间)结束了 | | solarNoon | 太阳正午(太阳在最高点) | | goldenHour | 傍晚黄金时间开始 | | sunsetStart | 日落开始(太阳的底部边缘触到地平线) | | sunset | 日落(太阳消失在地平线下,傍晚民用暮色开始) | | dusk | 黄昏(航海黄昏开始) | | nauticalDusk | 航海黄昏(天文黄昏开始) | | night | 夜晚开始(足够暗,可以进行天文观测) | | nadir | 最低点(夜晚最黑暗的时刻,太阳在最低的位置) | | nightEnd | 夜晚结束(晨光开始) | | nauticalDawn | 航海黎明(航海黎明开始) | | dawn | 黎明(航海黎明结束,民用黎明开始) |

查询银河最佳观测时间

SunCalc.getTrueGalaxyTimes( /*纬度*/ latitude, /*经度*/ longitude, /*日期 default=new Date()*/ date,)

返回一个对象,属性startend表示银河最佳观测的起始时间。

| 属性 | 描述 | | --------------- | ------------------------------------------------------------------------ | | code | 状态码:1:可观测 2:不可观测| | | start | 可观测开始时间,date时间,unix时间戳 | | end | 可观测结束时间,date时间,unix时间戳 | | hours | 持续时间,单位:小时 |

查询月升月落时间

SunCalc.getMoonTimes(/*日期 default=new Date()*/ date, /*纬度*/ latitude, /*经度*/ longitude,);

返回一个对象,属性riseset表示月升和月落时间。

| 属性 | 描述 | | --------------- | ------------------------------------------------------------------------ | | rise | 月升时间,date时间,unix时间戳 | | set | 月落时间,date时间,unix时间戳 |