Closed fallais closed 6 years ago
Sorry, I am a little busy recently. I will check this case after work.
Please show my your code, output and your expected output.
My case is exactly this one : https://github.com/jakubroztocil/rrule/issues/157 My start and end date occurs between a daylight saving.
But the occurrences do not take this is in account.
package main
import (
"fmt"
"time"
rrule "github.com/wangjohn/rrule-go"
)
func main() {
r, err := rrule.NewRRule(rrule.ROption{
Freq: rrule.WEEKLY,
Byweekday: []rrule.Weekday{rrule.SU},
Byhour: []int{16},
Byminute: []int{0},
Dtstart: time.Date(2016, 8, 1, 0, 0, 0, 0, time.Local),
})
if err != nil {
panic(err)
}
for _, i := range r.Between(time.Date(2016, 8, 1, 0, 0, 0, 0, time.Local), time.Date(2016, 11, 1, 0, 0, 0, 0, time.Local), true) {
fmt.Println(i)
}
}
2016-08-07 16:00:00 +1000 AEST
2016-08-14 16:00:00 +1000 AEST
2016-08-21 16:00:00 +1000 AEST
2016-08-28 16:00:00 +1000 AEST
2016-09-04 16:00:00 +1000 AEST
2016-09-11 16:00:00 +1000 AEST
2016-09-18 16:00:00 +1000 AEST
2016-09-25 16:00:00 +1000 AEST
2016-10-02 16:00:00 +1100 AEDT
2016-10-09 16:00:00 +1100 AEDT
2016-10-16 16:00:00 +1100 AEDT
2016-10-23 16:00:00 +1100 AEDT
2016-10-30 16:00:00 +1100 AEDT
My output is right for that case.
Hello, is it working with the rrule.All()
too ?
Yes.
If you really got a wrong output, please show me the code.
Ok, let me try.
Another question : Why is the package name that you use not from teambition
?
Sorry. I use another contributor's code. It doesn't matter.
Thanks a lot !
Hello,
Let's take the France for the example. I create a recurrent event that start the 19 March to the 2 April, every Monday and Wednesday, at 14h. But, in France, the 25 March, a daylight saving is observed.
And my
rrule.All()
is wrong.How can I handle this case please ? Thanks a lot for this library !