add commaformatter
This commit is contained in:
parent
d3f14f70d8
commit
b3daf1a0f9
@ -18,7 +18,6 @@ func (f *Formatter) Format(val float64, date1904 bool) string {
|
||||
itemFormatString, _ := i.translateToGolangFormat()
|
||||
gf += itemFormatString
|
||||
}
|
||||
fmt.Println(f)
|
||||
if f.typ == DATEFORMAT {
|
||||
t := TimeFromExcelTime(val, date1904)
|
||||
return t.Format(gf)
|
||||
@ -48,6 +47,22 @@ func (self *basicFormatter) String() string {
|
||||
return fmt.Sprintf("basic formatter as (%s)", self.origin)
|
||||
}
|
||||
|
||||
type commaFormatter struct {
|
||||
basicFormatter
|
||||
}
|
||||
|
||||
func (self *commaFormatter) translateToGolangFormat() (string, error) {
|
||||
return self.origin, nil
|
||||
}
|
||||
|
||||
func (self *commaFormatter) setOriginal(o string) {
|
||||
self.origin = o
|
||||
}
|
||||
|
||||
func (self *commaFormatter) String() string {
|
||||
return fmt.Sprintf("basic formatter as (%s)", self.origin)
|
||||
}
|
||||
|
||||
type YearFormatter struct {
|
||||
basicFormatter
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user