Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I don't understand why it would be, so I think I'm missing some things. If you're lenient in what you accept, you'd need a lot of conversions.
  • ...because MM/DD/YYYY is a strictly-defined thing. It would be awful if you emitted "something that people can tell is a date or something."

    You know. Like "anything that matches RFC 822 dates."

    • MM/DD/YYYY is not strictly defined here in Australia, since we often don't know if it's just American racism, or if the date is actially DD/MM/YYYY.

      • Indeed.

        The only time you should ever be using MM/DD/YYYY is if you are talking to some legacy system that only understands that format, or if you are making content for users that you can be sure are Amercians.

        And god help you if you ever try to use it to serialize dates into a file format.

      • Uh. No, you're being a bit odd.

        MM/DD/YYYY is very very very well defined. It means two digit month, two digit day of month, four digit year.

        NN/NN/NNNN is obviously extremely confusing because of what you said.

        If you have defined, in your data format definition, that dates are MM/DD or DD/MM, it is perfectly unambiguous, because the context (of the specification) makes it clear.

        If you are emitting something with no specification, then that's a different matter.

        • The point is that reasonable people do MM/DD/YYYY, and reasonable people do DD/MM/YYYY, and there is no way to tell whether NN/NN/NNNN is one or the other just by looking at it. So you need to refer to an external authority, and deity help you if you have none. In contrast, no reasonable person does YYYY-DD-MM, so if you get NNNN-NN-NN you know how to interpret it just by looking at it. In that sense, it is better to always use NNNN-NN-NN because the format is self-documenting.

          • I understand why to use YMD format. I use it. I don't understand how that's relevant to writing a method that emits MDY to be a violation of one's ethics. It emits a known quantity.

            Using it stupidly is completely unrelated.

            • Because it makes one party to the perpetuation of a bad design. (And egregious ambiguity in data such as the DMY/MDY confusion is the worst kind of bad design there is.) Now we don’t always have a choice in what to implement (f.ex. when implementing a standard that prescribes the dumb choice), but that doesn’t make the design any better. (You might say it is well specified, but considering the consequences of moronity [] and Ruby’s postulate [] in tandem, that means the specification, however ri

          • In that sense, it is better to always use NNNN-NN-NN because the format is self-documenting.

            I sadly have to differ with that. I use ISO standard YYYY-MM-DD dates all the time. I write dates this way every chance I get. And I'm constantly having to explain to people what it means.

            The average person on my continent simply cannot figure out the standard, even though it is mind-numbingly obvious.


            J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers