Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well the point is that they shouldn't call the method iso8601 if it doesn't implement the whole iso8601 standard


That's a bold statement. I don't think I've ever seen a program / library which implements any standard completely and without issues. It's not uncommon to see a list of things that are not done, incomplete, or just called out as wrong and rejected from the implementation.

It's not perfect, but no implementation will ever be imho.


Not implementing part of a standard is different from implementing it differently than the standard specifies.

YYYY-MM is year-month, not year-day365. It's not very reasonable to interpret yyyy-mm as year-day365 in a function called iso8601 when the standard says that's not how to interpret it.


I think it's OK to be missing a few aspects of the standard. But in that case, it should still parse correctly and throw a "not supported" exception for unsupported features.

Parsing it incorrectly is bad news.


Ever seen a method called "validateEmailAddress" or something similar? Take any given implementation of that and you can predict with almost certainty that it does not validate all possible valid email addresses (which also has a spec that even came along after the internet was conceived).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: