omxtime

package
v0.0.0-...-db7d511 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

A small helper to parse time to nasdaq Stockholm time, and guess open times

Index

Constants

View Source
const (
	MinuteX1  = 60000
	MinuteX3  = MinuteX1 * 3
	MinuteX5  = MinuteX1 * 5
	MinuteX10 = MinuteX1 * 10
	MinuteX15 = MinuteX1 * 15
)

Variables

This section is empty.

Functions

func MillisToDayString

func MillisToDayString(millis int64) string

func MillisToString

func MillisToString(millis int64) string

func ParseDate

func ParseDate(dateStr string) (time.Time, error)

Types

type OmxTime

type OmxTime struct {
	Date      string
	Millis    int64
	OmxOpen   int64
	OmxClose  int64
	DayOfWeek int
}

func NewOmxTimeDate

func NewOmxTimeDate(dateStr string) (*OmxTime, error)

func NewOmxTimeMillis

func NewOmxTimeMillis(millis int64) *OmxTime

func NewOmxTimeNow

func NewOmxTimeNow() *OmxTime

func (*OmxTime) Init

func (ot *OmxTime) Init(dte time.Time) *OmxTime

func (*OmxTime) IsToday

func (ot *OmxTime) IsToday(millis int64) bool

func (*OmxTime) IsTrading

func (ot *OmxTime) IsTrading(timeMillis int64) bool

func (*OmxTime) NextTradingDay

func (ot *OmxTime) NextTradingDay() *OmxTime

func (*OmxTime) PrevTradingDay

func (ot *OmxTime) PrevTradingDay() *OmxTime

func (*OmxTime) TimeSlot

func (ot *OmxTime) TimeSlot(timeMillis int64, scaleMillis int64) (idx int64)

Jump to

Keyboard shortcuts

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