This commit is contained in:
aozhiwei 2020-10-23 11:14:30 +08:00
parent 88b284f7de
commit 5b8b5563e9
3 changed files with 38 additions and 5 deletions

View File

@ -4,6 +4,16 @@ type MutableXObject struct {
XObject
}
func NewMxoArray() *MutableXObject {
p:= new(MutableXObject)
return p
}
func NewMxoObject() *MutableXObject {
p:= new(MutableXObject)
return p
}
func (this *MutableXObject) PushXValue(val *XValue) *MutableXObject{
return this
}
@ -23,3 +33,7 @@ func (this *MutableXObject) SetXObject(key string, val *XObject) *MutableXObject
func (this *MutableXObject) SetMutableXObject(key string, val *MutableXObject) *MutableXObject{
return this
}
func (this *MutableXObject) AsXObject() *XObject{
return &this.XObject
}

View File

@ -1,10 +1,12 @@
package q5
import "os"
import "net"
import "net/http"
import "time"
import "reflect"
import (
"os"
"net"
"net/http"
"time"
"reflect"
)
func GetDaySeconds(seconds int64) int64 {
return 0
@ -82,3 +84,8 @@ func IsNumberType(v interface{}) bool {
return false
}
}
func FormatUnixDateTime(sec int64) string {
strTime := time.Unix(sec, 0).Format("2006-01-02 15:04:05")
return strTime
}

View File

@ -19,6 +19,18 @@ type XValue struct
_val interface{}
}
func NewXInt32(val int32) *XValue {
p := new(XValue)
p.SetInt32(val)
return p
}
func NewXString(val string) *XValue {
p := new(XValue)
p.SetString(val)
return p
}
func (this *XValue) GetType() int8 {
if this._type == XVT_UNDEFINED {
return XVT_INT