date

package
v4.1.15+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package date implements encoding of 7 byte Oracle DATE storage formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date [7]byte

Date is an OCIDate

SQLT_ODT: 7 bytes

http://www.orafaq.com/wiki/Date

The internal format is the following one:

century + 100
year in the century + 100
month
day
hour + 1
minute + 1
second + 1

So in the previous example the date was 19-DEC-2007 at 22:35:10.

func FromTime

func FromTime(t time.Time) Date

FromTime returns a Date from a time.Time Does the allocation inside, so easier to use.

func (Date) Bytes

func (dt Date) Bytes() []byte

func (Date) Equal

func (dt Date) Equal(other Date) bool

func (Date) Get

func (dt Date) Get() time.Time

func (Date) GetIn

func (dt Date) GetIn(zone *time.Location) time.Time

func (Date) IsNull

func (dt Date) IsNull() bool

func (Date) MarshalJSON

func (dt Date) MarshalJSON() ([]byte, error)

func (*Date) Set

func (dt *Date) Set(t time.Time)

func (Date) String

func (dt Date) String() string

func (*Date) UnmarshalJSON

func (dt *Date) UnmarshalJSON(p []byte) error

Jump to

Keyboard shortcuts

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