romandateandtime

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 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)


     25 Jul 24 12:42 EDT
     hora VI a. d. vii Quinctilis MMXXIV

Comparanda as one moves north from the equator
	Quito
	Miami
	Toronto
	Chisasibi
Local time                  11:42:00 	12:42:00    12:42:00 	12:42:00
Length of daylight hour     01:00:32 	01:07:13    01:14:02 	01:20:26
Roman hour                   hora VI 	 hora VI     hora VI 	 hora VI
Time left in this hour      00:38:27 	00:45:08    00:41:54 	00:39:58
Longitude                     -78.52      -80.19      -79.38      -78.90
Latitude                       -0.23       25.77       43.65       53.78

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 for this PlaceAndTime? e.g., 1h16m1.583333333s

func (*PlaceAndTime) GetRTElapsed

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

GetRTElapsed - how much time has passed in this Roman hour at this PlaceAndTime? e.g. 22m26s

func (*PlaceAndTime) GetRTRemainder

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

GetRTRemainder - how much time is left in this Roman hour at this PlaceAndTime before the next hour arrives? e.g. 22m26s

func (*PlaceAndTime) GetRomanDate

func (p *PlaceAndTime) GetRomanDate() string

GetRomanDate - a. d. vii Quinctilis MMXXIV

func (*PlaceAndTime) GetRomanDateAndTime

func (p *PlaceAndTime) GetRomanDateAndTime() string

GetRomanDateAndTime - 25 Jul 24 10:09 EDT --> hora IV a. d. vii Quinctilis MMXXIV (in Toronto...)

func (*PlaceAndTime) GetRomanTime

func (p *PlaceAndTime) GetRomanTime() string

GetRomanTime - 10:09 EDT --> hora IV (in Toronto...)

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