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.
  • ...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.

      • 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 rigorous, is still a bad design.) That’s all. Doesn’t mean refusing to do the job, but it does mean discomfort with the necessity.