Popularity
4.0
Growing
Activity
0.0
Stable
83
6
13

Programming language: Go
License: MIT License
Tags: Date & Time    

go-sunrise alternatives and similar packages

Based on the "Date and Time" category.
Alternatively, view go-sunrise alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of go-sunrise or a related project?

Add another 'Date and Time' Package

README

go-sunrise

Build Status Coverage Status Go Report Card GoDoc MIT License

Go package for calculating the sunrise and sunset times for a given location based on this method.

Usage

To calculate sunrise and sunset times, you will need the following information:

  • the date for which you wish to calculate the times
  • the latitude and longitudinal coordinates of the location

Begin by importing the package:

import "github.com/nathan-osman/go-sunrise"

Next, feed the information into the SunriseSunset() method:

rise, set := sunrise.SunriseSunset(
    43.65, -79.38,          // Toronto, CA
    2000, time.January, 1,  // 2000-01-01
)

The two return values will be the sunrise and sunset times for the location on the given day as time.Time values.


*Note that all licence references and agreements mentioned in the go-sunrise README section above are relevant to that project's source code only.