Bugfix release.

Fixes

  • Fixed parsing, especially for strings in the form 31-01-01.

    import pendulum
    
    # Before
    print(pendulum.parse('2013-11-1'))
    '2013-04-21T00:00:00+00:00'
    # Now
    print(pendulum.parse('2013-11-1'))
    '2013-11-01T00:00:00+00:00'
    
    # Before
    print(pendulum.parse('10-01-01'))
    '2001-10-01T00:00:00+00:00'
    print(pendulum.parse('31-01-01'))
    '2001-01-31T00:00:00+00:00'
    print(pendulum.parse('32-01-01'))
    '2032-01-01T00:00:00+00:00'
    # Now
    print(pendulum.parse('10-01-01'))
    '2010-01-01T00:00:00+00:00'
    print(pendulum.parse('31-01-01'))
    '2031-01-01T00:00:00+00:00'
    print(pendulum.parse('32-01-01'))
    '2032-01-01T00:00:00+00:00'
    
View Comments