Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only the last field can have a fraction check doesn't always work #19

Closed
mihaitodor opened this issue Oct 30, 2021 · 1 comment
Closed

Comments

@mihaitodor
Copy link

mihaitodor commented Oct 30, 2021

The program below prints P3.5YT5.3S: 'Y' & 'S' only the last field can have a fraction because P3.5Y6M4DT12H30M5.3S passes the check, although I'm guessing it shouldn't.

package main

import "github.com/rickb777/date/period"

func main() {
        _, err := period.Parse("P3.5Y6M4DT12H30M5.3S", false)
        if err != nil {
                println(err.Error())
        }

        _, err = period.Parse("P3.5YT5.3S", false)
        if err != nil {
                println(err.Error())
        }
}

PS: Thank you for putting in the time to write this library!

@rickb777
Copy link
Owner

Resolved in v1.20.3.

mihaitodor added a commit to mihaitodor/connect that referenced this issue Sep 19, 2023
This pulls in a bug fix related to the `ts_add_iso8601()`
and `ts_sub_iso8601()` bloblang methods.
Details here: rickb777/date#19

Signed-off-by: Mihai Todor <todormihai@gmail.com>
mihaitodor added a commit to mihaitodor/connect that referenced this issue Sep 19, 2023
This pulls in a bug fix related to the `ts_add_iso8601()`
and `ts_sub_iso8601()` bloblang methods.
Details here: rickb777/date#19

Signed-off-by: Mihai Todor <todormihai@gmail.com>
peczenyj pushed a commit to peczenyj/connect that referenced this issue Oct 30, 2023
This pulls in a bug fix related to the `ts_add_iso8601()`
and `ts_sub_iso8601()` bloblang methods.
Details here: rickb777/date#19

Signed-off-by: Mihai Todor <todormihai@gmail.com>
Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants