julian

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package julian provides functionality for working with time using the Julian format.

Index

Constants

View Source
const (
	DaySeconds         = 86400
	UnixEpochJulianDay = 2440587.5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time float64

Time

func FromTime

func FromTime(t time.Time) Time

FromTime converts a time.Time into a Julian day.

func Now

func Now() Time

Now returns the current time. Location is set to UTC.

func Parse

func Parse(layout, s string) (Time, error)

Parse

func (Time) Equal

func (t Time) Equal(t2 Time) bool

func (Time) MarshalText

func (t Time) MarshalText() ([]byte, error)

func (*Time) Scan

func (t *Time) Scan(value any) (err error)

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

Time returns t as time.Time

func (*Time) UnmarshalText

func (t *Time) UnmarshalText(p []byte) (err error)

func (Time) Value

func (t Time) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL