timeparse

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Since

func Since(time1, time1format, time1location, time2, time2format, time2location string) (float64, error)

Types

type DateDim

type DateDim struct {
	// Other
	TimeZone       string `json:"TimeZone"`       // lite
	TimeZoneOffset string `json:"TimeZoneOffset"` // lite
	YearMonth      int    `json:"YearMonth"`      // int
	YearWeek       int    `json:"YearWeek"`       // int
	YearIsoWeek    int    `json:"YearIsoWeek"`    // int
	YearDay        int    `json:"YearDay"`        // int
	DateID         string `json:"DateId"`         // lite
	DateKey        int    `json:"DateKey"`        // lite
	DateTimeKey    int    `json:"DateTimeKey"`    // lite
	HourID         string `json:"HourId"`
	HourKey        int    `json:"HourKey"`
	Millis         int    `json:"Millis"`   // lite
	RawValue       string `json:"RawValue"` // lite

	// UTC
	UTC     string `json:"UTC"`     // lite
	DateUTC string `json:"DateUTC"` // lite
	HourUTC int    `json:"HourUTC"`

	// Local
	Local     string `json:"Local"`     // lite
	DateLocal string `json:"DateLocal"` // lite
	HourLocal int    `json:"HourLocal"`
}

DateDim is the date dimension object returned from the timeparse function

func TimeDateDimensions

func TimeDateDimensions(inputSrcTs, inputSrcFormat, inputSrcTz, requiredTz string) (*DateDim, error)

TimeDateDimensions generates a JSON object dependent on input source timestamp, input source format and input source timezone using golang time formats

type DateDimLite added in v1.7.1

type DateDimLite struct {
	// Other
	TimeZone       string `json:"TimeZone"`       // lite
	TimeZoneOffset string `json:"TimeZoneOffset"` // lite
	DateID         string `json:"DateId"`         // lite
	DateKey        int    `json:"DateKey"`        // lite
	DateTimeKey    int    `json:"DateTimeKey"`    // lite
	Millis         int    `json:"Millis"`         // lite
	RawValue       string `json:"RawValue"`       // lite

	// UTC
	UTC     string `json:"UTC"`     // lite
	DateUTC string `json:"DateUTC"` // lite

	// Local
	Local     string `json:"Local"`     // lite
	DateLocal string `json:"DateLocal"` // lite
}

DateDimLite is the date dimension object returned from the timeparse function (light version)

func TimeDateDimensionsLite

func TimeDateDimensionsLite(inputSrcTs, inputSrcFormat, inputSrcTz, requiredTz string) (*DateDimLite, error)

TimeDateDimensionsLite generates a JSON object dependent on input source timestamp, input source format and input source timezone using golang time formats

Jump to

Keyboard shortcuts

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