Skip to content

Commit

Permalink
feat: add func WEEK
Browse files Browse the repository at this point in the history
  • Loading branch information
ypli0629 authored Aug 17, 2024
1 parent 05aa4db commit 7b891b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions field/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ func (field Time) Month() Int {
return Int{expr{e: clause.Expr{SQL: "MONTH(?)", Vars: []interface{}{field.RawExpr()}}}}
}

// Week equal to WEEK(self)

Check failure on line 122 in field/time.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

[golangci] reported by reviewdog 🐶 exported: comment on exported method Time.WEEK should be of the form "WEEK ..." (revive) Raw Output: field/time.go:122:1: exported: comment on exported method Time.WEEK should be of the form "WEEK ..." (revive) // Week equal to WEEK(self) ^
func (field Time) WEEK() Int {
return Int{expr{e: clause.Expr{SQL: "WEEK(?)", Vars: []interface{}{field.RawExpr()}}}}
}

// Day equal to DAY(self)
func (field Time) Day() Int {
return Int{expr{e: clause.Expr{SQL: "DAY(?)", Vars: []interface{}{field.RawExpr()}}}}
Expand Down

0 comments on commit 7b891b8

Please sign in to comment.