Skip to content

Date Parsing Rpoblem #26

Open
Open

Description

@hAzUpL8

Hi,
In Slovenia date format is "d. M. yyyy" (Example: "13. 4. 2022") and the problem is that this dateParser can't parse it:

Exception in thread "main" java.time.format.DateTimeParseException: Text 12. 4. 2022 cannot parse at 0
at com.github.sisyphsu.dateparser.DateParser.error(DateParser.java:401)
at com.github.sisyphsu.dateparser.DateParser.error(DateParser.java:397)
at com.github.sisyphsu.dateparser.DateParser.parse(DateParser.java:131)
at com.github.sisyphsu.dateparser.DateParser.parseDate(DateParser.java:67)
at com.github.sisyphsu.dateparser.DateParserUtils.parseDate(DateParserUtils.java:29)
at si.zzi.eforms.wp.utils.DateJSFConverter.main(DateJSFConverter.java:51)

Can you help? regards

Activity

  1. andriy-samson commented on Apr 4, 2022

    @andriy-samson

    It looks like Slovenia data format is d.M.yyyy but in your example you use similar format but with extra space "d. M. yyyy".
    Are you sure that this is official format with spaces? For me it looks like a custom format, so you have to use a custom parser for this (example: SimpleDateFormat)
    Without spaces it is parsed without error.

  2. hAzUpL8 commented on Apr 5, 2022

    @hAzUpL8
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions