Incorrect parsing of dates starting 2018

Splash Forums PrettyTime Users Incorrect parsing of dates starting 2018

This topic contains 0 replies, has 1 voice, and was last updated by  abhishek.nandgaonkar 3 hours, 46 minutes ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27691

    CODE I EXECUTE

    text = “Fri Dec 30 11:09:29 EST 2016”;
    dateFound = new PrettyTimeParser().parse(text);
    System.out.println(dateFound);

    text = “Sun Jan 01 11:09:29 EST 2017”;
    dateFound = new PrettyTimeParser().parse(text);
    System.out.println(dateFound);

    text = “Sat Dec 30 11:09:29 EST 2017”;
    dateFound = new PrettyTimeParser().parse(text);
    System.out.println(dateFound);

    text = “Sun Dec 31 11:09:29 EST 2017”;
    dateFound = new PrettyTimeParser().parse(text);
    System.out.println(dateFound);

    text = “Mon Jan 01 11:09:29 EDT 2018”;
    dateFound = new PrettyTimeParser().parse(text);
    System.out.println(dateFound);

    text = “Tue Jan 01 11:09:29 EDT 2019”;
    dateFound = new PrettyTimeParser().parse(text);
    System.out.println(dateFound);

    ***************************************************************

    OUTPUT

    [Fri Dec 30 11:09:29 EST 2016]
    [Sun Jan 01 11:09:29 EST 2017]
    [Sat Dec 30 11:09:29 EST 2017]
    [Sun Dec 31 11:09:29 EST 2017]
    [Mon Jan 01 11:09:29 EST 2007]
    [Tue Jan 01 11:09:29 EST 2013]

    I am still wondering what makes the parser parse the dates incorrectly after December 31 2017.
    I am doing something wrong here. Any help would be appreciated.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Comments are closed.