common

package
v0.0.0-...-6bc4a94 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeLayout = "2006-01-02" //this represents YYYY-MM-DD

TimeLayout helps to parse a date string of the format YYYY-MM-DD

  Intended to be used with the following function:
	 time.Parse(TimeLayout, date)

Functions

func ConvertAmtCurTime

func ConvertAmtCurTime(denomOut string, in *types.AmtCurTime) (out *types.AmtCurTime, err error)

ConvertAmtCurTime converts a AmtCurTime variable to the same value with a different valuation denom

func ParseDateRange

func ParseDateRange(dateRange string) (startDate, endDate time.Time, err error)

ParseDateRange parses a date range string of the format start:end

  where the start and end date are of the format YYYY-MM-DD.
  The parsed dates are time.Time and will return the zero time for
  unbounded dates, ex:
  unbounded start:	:2000-12-31
	 unbounded end: 	2000-12-31:

Types

This section is empty.

Jump to

Keyboard shortcuts

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