mirror of
https://github.com/documize/community.git
synced 2025-07-20 13:49:42 +02:00
Bump version to 5.11.0
This commit is contained in:
parent
a32510b8e6
commit
510e1bd0bd
370 changed files with 18825 additions and 5454 deletions
15
vendor/github.com/golang-sql/civil/civil.go
generated
vendored
15
vendor/github.com/golang-sql/civil/civil.go
generated
vendored
|
@ -107,6 +107,11 @@ func (d1 Date) After(d2 Date) bool {
|
|||
return d2.Before(d1)
|
||||
}
|
||||
|
||||
// IsZero reports whether date fields are set to their default value.
|
||||
func (d Date) IsZero() bool {
|
||||
return (d.Year == 0) && (int(d.Month) == 0) && (d.Day == 0)
|
||||
}
|
||||
|
||||
// MarshalText implements the encoding.TextMarshaler interface.
|
||||
// The output is the result of d.String().
|
||||
func (d Date) MarshalText() ([]byte, error) {
|
||||
|
@ -175,6 +180,11 @@ func (t Time) IsValid() bool {
|
|||
return TimeOf(tm) == t
|
||||
}
|
||||
|
||||
// IsZero reports whether time fields are set to their default value.
|
||||
func (t Time) IsZero() bool {
|
||||
return (t.Hour == 0) && (t.Minute == 0) && (t.Second == 0) && (t.Nanosecond == 0)
|
||||
}
|
||||
|
||||
// MarshalText implements the encoding.TextMarshaler interface.
|
||||
// The output is the result of t.String().
|
||||
func (t Time) MarshalText() ([]byte, error) {
|
||||
|
@ -262,6 +272,11 @@ func (dt1 DateTime) After(dt2 DateTime) bool {
|
|||
return dt2.Before(dt1)
|
||||
}
|
||||
|
||||
// IsZero reports whether datetime fields are set to their default value.
|
||||
func (dt DateTime) IsZero() bool {
|
||||
return dt.Date.IsZero() && dt.Time.IsZero()
|
||||
}
|
||||
|
||||
// MarshalText implements the encoding.TextMarshaler interface.
|
||||
// The output is the result of dt.String().
|
||||
func (dt DateTime) MarshalText() ([]byte, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue