Skip to content

DestinyLab/go-jdn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-jdn

go-jdn is the tool of Julian Day Number.

GoDoc Go Report Card Build Status Coverage Status

Installation

go get -u github.com/DestinyLab/go-jdn

Usage

package main

import (
  "fmt"
  "time"

  "github.com/DestinyLab/go-jdn"
)

func main() {
  t1 := time.Date(2018, 4, 13, 0, 0, 0, 0, time.UTC)
  fmt.Printf("%v", jdn.ToNumber(t1))
  // Output: 2458222

  t2 := JDN(2448046).ToTime()
  fmt.Printf("%v %v %v\n", t2.Year(), t2.Month(), t2.Day())
  // Output: 1990 June 3
}

More Info

About

go-jdn is the tool of Julian Day Number

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages