romandateandtime

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

README

romandateandtime

import rdt "github.com/e-gun/romandateandtime"

	var pt rdt.PlaceAndTime
	pt.T = time.Now()
	pt.Lat = LATITUDE
	pt.Lon = LONGITUDE
	
	rdt.Timezone = "America/New_York"
	
    fmt.Println(pt.GetRomanDateAndTime())

if you build as a binary...

(romandateandtime: get a roman date and time like "hora III a. d. iv Nonas Ianuarias MMVI")

-h      this help
-d      date with the following layout: "2006-01-02 15:04"
-lg     longitude (default: -79.38)
-lt     latitude (default: 43.65)

Documentation

Index

Constants

View Source
const (
	LATITUDE  = 43.65
	LONGITUDE = -79.38
)

Variables

View Source
var (
	DefaultTimeZone = "America/New_York"
	DefaultPT       = PlaceAndTime{
		T:   time.Now(),
		Lat: LATITUDE,
		Lon: LONGITUDE,
	}
)
View Source
var (
	RomanYear = buildromanyear()
)

Functions

func GetYMD

func GetYMD(t time.Time) (int, time.Month, int)

Types

type PlaceAndTime

type PlaceAndTime struct {
	T   time.Time
	Lat float64
	Lon float64
	TZ  string // e.g., "America/New_York"
}

func (*PlaceAndTime) GetLenOfDaytimeHour

func (p *PlaceAndTime) GetLenOfDaytimeHour() time.Duration

GetRTRemainder - how long is a daytime hour at p?

func (*PlaceAndTime) GetRTElapsed

func (p *PlaceAndTime) GetRTElapsed() time.Duration

GetRTElapsed - how much time has passed in this Roman hour

func (*PlaceAndTime) GetRTRemainder

func (p *PlaceAndTime) GetRTRemainder() time.Duration

GetRTRemainder - how much time is left in this Roman hour before the next hour arrives

func (*PlaceAndTime) GetRomanDate

func (p *PlaceAndTime) GetRomanDate() string

func (*PlaceAndTime) GetRomanDateAndTime

func (p *PlaceAndTime) GetRomanDateAndTime() string

func (*PlaceAndTime) GetRomanTime

func (p *PlaceAndTime) GetRomanTime() string

type RomanMonth

type RomanMonth struct {
	Name  string
	Abbr  string
	Days  int
	Nones int
	Ides  int
}

Jump to

Keyboard shortcuts

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