• cockycoder (unregistered)

    I just made my own time parser, WHERE is my dollar?? :)

  • John (unregistered) in reply to Code Dependent

    My guess is it's another convention like sData. It's a string, so s. Then again, maybe I'm giving him too much credit.

  • Andrew (unregistered) in reply to Code Dependent
    Code Dependent:
    What disturbs me is the parameter name: "datas". Since "data" is already the plural of "datum", what is datas? Some kind of fourth dimensional measurement?

    One of them was named Lor. There were a few others caused by time anomolies (sp?)

  • NH (unregistered) in reply to Date This

    The ISO format should be enough for everyone!

    yyyy-MM-dd HH:mm:ss

    (Silently ducks and hides)

  • Jimmy Dolittle (unregistered)

    I dunno about that. I like to do things manually!

    Jiff www.anonymity.cz.tc

  • anoncow (unregistered) in reply to JD
    JD:
    Professionals treat all warnings as errors. Amateurs ignore warnings. Idiots suppress warnings.

    Experts treat warnings as errors, but ignore them if that is the right thing to do in the particular circumstance.

  • Anon (unregistered)

    Reminds me of some date parsing code I came across in production. In the UK we put the day first, month second, but the US would often be a default setting and people would forget to set it.

    The code in question dealt with working out whether a particular date in some data was day first, or month first.

    i.e. is 5/10/08 the 5th October or 10th May?

    The solution: if month > 12 then swap day and month.

    It worked... over 50% of the time!

  • Neil (unregistered) in reply to anon

    to quote the late great Mitch Hedberg:

    "So you're a cook, can your farm?"

  • Neil (unregistered) in reply to JD
    JD:
    Professionals treat all warnings as errors. Amateurs ignore warnings. Idiots suppress warnings.

    amen, but integrating legacy code breaks this mantra...especially with java generics

  • JDocs (unregistered) in reply to I walked the dinosaur

    Almost every co-worker I've ever had...

  • Sammy (unregistered)

    Date parsing good in modern languages? Really?

    In Java if you don't call setLenient(false); on your date format class, it accepts invalid formats, and fills in the blanks where information is missing. Fair enough, you say, always call setLenient(false); Except that even this doesn't work properly. I found situations where it once again guessed and filled in the blanks when passed garbage that approximates a date.

    Does this mean I should write my own date parsing function? Well no. My solution though an awful kludge:

    1. Parse with a date formatter.
    2. Convert back to a string in the same format.
    3. Compare converted string to original string (after trimming both). If they match you have a winner.

    Having to do the above. THAT is a WTF!?

  • JC (unregistered) in reply to Mike5

    Probably the guy who coded this speaks Portuguese, "datas" is our word for "dates", and "dados" is our word for "data".

  • unodei (unregistered)

    might as well put in the loop

    for(Locale locale:Locale.getAvailableLocales() && !stop) {
    try { stop=true; }

    and weed out the use of break keyword!

  • Anon (unregistered)

    the

     and 
    HTML tags create pre-formatted text. Text within these tags is typically displayed in a non-proportional font exactly as it is laid out in the file. Whereas browsers ignore white space for all of the other HTML tags, the
     tag signals that this white space should be rendered as authored.(excerpt from wikipedia article HTML element)
    The reason they're there is because they are inside a javadoc comment. Javadoc is a program that takes code and automatically creates HTML documentation files.

  • asdsad (unregistered) in reply to Mike5

    I don't see the WTF here. How would you create the Date?

  • anon (unregistered) in reply to Date This

    Hey, that was today's date!

  • bubba (unregistered)

    The sad thing is that I'm working with a very expensive product sold by IBM that does almost this exact thing.

  • (nodebb)

    cool

    Addendum 2022-11-13 19:36: I have never programmed before. Because of this, it is preferable to get assistance from do my accounting homework for me assignmentshark . This is unquestionably the best choice. I have not yet mastered it.

  • DarrickPiero (unregistered)
    Comment held for moderation.
  • DarrickPiero (unregistered)

    Hey everyone! I've just stumbled upon an incredible resource that's all about cryptocurrency exchanges. If you're looking to dive deeper into the world of crypto, this might be the perfect spot for you!

    The site (https://cryptoairdrops.ru/) offers comprehensive insights of a wide range of cryptocurrency platforms, including fees, security measures, available cryptocurrencies, and user experience. Whether you're a beginner just starting out or an experienced trader, there's something for everyone.

    What I found particularly helpful was their side-by-side comparisons, which made it super easy to evaluate different exchanges and find the one that best fits my needs. They also cover the latest developments in the crypto world, which keeps you informed on all the critical changes.

    If you're looking into exploring different cryptocurrency exchanges, I highly recommend checking this site out. It's a goldmine of information that can help you make informed decisions in the ever-changing world of cryptocurrency.

    Let's dive into it and share our experiences! Would love to hear your thoughts and experiences with different exchanges as well.

Leave a comment on “Extensive Date Parsing”

Log In or post as a guest

Replying to comment #:

« Return to Article