New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sunrise-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sunrise-api

Get the sunrise and sunset times for a given location.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

sunrise-api Travis CI Build Status

Get the sunrise and sunset times for a given location.

NPM Badge

Install

npm install sunrise-api

Usage

const sunrise = require("sunrise-api");

(async () => {
	await sunrise(-36.8484437, 174.7600023);
	/* {
		sunrise: '2020-03-19T18:24:27+00:00',
		sunset: '2020-03-20T06:32:06+00:00',
		solarNoon: '2020-03-20T00:28:16+00:00',
		dayLength: 43659,
		civilTwilightBegin: '2020-03-19T17:58:41+00:00',
		civilTwilightEnd: '2020-03-20T06:57:52+00:00',
		nauticalTwilightBegin: '2020-03-19T17:28:29+00:00',
		nauticalTwilightEnd: '2020-03-20T07:28:04+00:00',
		astronomicalTwilightBegin: '2020-03-19T16:57:52+00:00',
		astronomicalTwilightEnd: '2020-03-20T07:58:40+00:00
	} */
})();

API

sunrise(latitude, longitude, options?)

latitude

Type: number

The Latitude of the location.

longitude

Type: number

The longitude of the location.

options

Type: object

date

Type: string Default: today

Date to get the information for in the YYYY - MM - DD format or today.

Attribution

Data provided by https://sunrise-sunset.org/api.

Keywords

sunrise

FAQs

Package last updated on 20 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts