Skip to content

Commit

Permalink
fix issue os.date(*t) sunday's wday==0
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan committed Oct 30, 2017
1 parent eb1c729 commit e0ee16d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oslib.go
Expand Up @@ -106,7 +106,7 @@ func osDate(L *LState) int {
ret.RawSetString("hour", LNumber(t.Hour()))
ret.RawSetString("min", LNumber(t.Minute()))
ret.RawSetString("sec", LNumber(t.Second()))
ret.RawSetString("wday", LNumber(t.Weekday()))
ret.RawSetString("wday", LNumber(t.Weekday()+1))
// TODO yday & dst
ret.RawSetString("yday", LNumber(0))
ret.RawSetString("isdst", LFalse)
Expand Down

0 comments on commit e0ee16d

Please sign in to comment.