func (trans *Transaction) Date() time.Time {
	return trans.date
}
---- api.Transactor methods.
package dblentry
import "time"
import "fmt"
import "strings"
import "sort"
import "github.com/prataprc/goparsec"
import "github.com/bnclabs/golog"
import "github.com/tn47/goledger/api"
type Transaction struct {
	journalfile string
	date        time.Time
	edate       time.Time
	code        string
	tags        []string
	metadata    map[string]interface{}
	notes       []string
	lineno      int
	lines       []string
	postings []*Posting
}
func NewTransaction(journalfile string) *Transaction {
	trans := &Transaction{
		journalfile: journalfile,
		tags:        []string{},
		metadata:    map[string]interface{}{},
		notes:       []string{},
		lines:       []string{},
	}
	return trans
}
func (trans *Transaction) getMetadata(key string) interface{} {
	if value, ok := trans.metadata[key]; ok {
		return value
	}
	return nil
}
func (trans *Transaction) setMetadata(key string, value interface{}) {
	trans.metadata[strings.ToLower(key)] = value
}
func (trans *Transaction) getState() string {
	state := trans.getMetadata("state")
	if state != nil {
		return state.(string)
	}
	return ""
}
func (trans *Transaction) SetLineno(lineno int) {
	trans.lineno = lineno
}
func (trans *Transaction) Lineno() int {
	return trans.lineno
}
func (trans *Transaction) Addlines(lines ...string) {
	trans.lines = append(trans.lines, lines...)
}
func (trans *Transaction) Printlines() []string {
	return trans.lines
}