Code Monkey home page Code Monkey logo

regexp-common-time's Issues

ISO8601 datetimes must use a separator for both date and time, or neither

Hi Mohammed,

The ISO spec states that either both the date and time must have a separator, or neither may have it.

However this module matches a non-conformant date:

$ perl -MRegexp::Common=time -wE 'say $RE{time}{iso}->matches("1901-02-03T040506")'

1

On the other hand DateTime::Format::ISO8601 rejects the date:

$ perl -MDateTime::Format::ISO8601 -wE 'say DateTime::Format::ISO8601->parse_datetime("1901-02-03T040506")->datetime;'

Invalid date format: 1901-02-03T040506 at -e line 1.

Tests fail on perls before 5.12

t/american.t depends on the 'unicode_strings' feature, which is a 5.12+ feature, but META for this module indicates support for perls 5.6 and up.

 $ prove -v t/american.t 
t/american.t .. Feature "unicode_strings" is not supported by Perl 5.10.1 at t/american.t line 4.
BEGIN failed--compilation aborted at t/american.t line 4.
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 

Test Summary Report
-------------------
t/american.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  0 wallclock secs ( 0.01 usr +  0.01 sys =  0.02 CPU)
Result: FAIL

this would additionally fail on perls without feature in core (perls before 5.9.3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.