uniplaces / carbon

Carbon for Golang, an extension for Time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: EndOfWeek may go to the next week when it is sunday!

iflamed opened this issue · comments

package main

import (
	"fmt"

	"github.com/uniplaces/carbon"
)

func main() {
	t, err := carbon.Parse("2006-01-02", "2021-01-17", "Asia/Shanghai")
	t = t.EndOfWeek()
	fmt.Println(t)
	fmt.Println(err)
}

try this link https://play.golang.org/p/BB5A7HM1TYZ

This should be fixed now

@tlfbrito Hi, still have this problem. uniplaces/carbon v0.1.6.