git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Date parsing

From
SRSverre Rabbelier <alturin@gmail.com>
Date
Jun 10, 2008, 15:31 UTC
Message-ID
<bd6139dc0806100831y7a00a0f4sbc8dee9df7a8c16a@mail.gmail.com>
In-Reply-To
<Zx2uvEYSssjj9E0HrmUL8wYASyWX9L9w8LkR-gGRAmnD9isjoEeyKg@cipher.nrlssc.navy.mil>
On Tue, Jun 10, 2008 at 5:10 PM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
> Take a look at match_multi_number in date.c
> European ordering is preferred when the separator is '.'
Ok, then I'll use . in the future, that's nice :).
> The timezone didn't change. One date is in daylight saving time, the other
> is not. The offset from GMT is different to reflect this.
As Hannes said, no bug there, my mistake.
Show 7 quoted lines
>> What does the list think about this? Is this "normal"
>> behavior? If not, what (if anything) should we do about it?
>
> There will be flaws in any system that tries to automatically guess the
> format. If there is not already one, perhaps a statement should be added
> to the appropriate documentation describing how to ensure that european
> ordering is used to parse the date.

I think that it should bail out when it encounters "20-01-2008" instead of automagically going for european notation. Even more helpfull would be to inform the user that "20.01.2008" is the proper notation.

-- 
Cheers,

Sverre Rabbelier
Previous: Brandon CaseyNext: Linus Torvalds
Message 5 of 11 in “Date parsing”
  1. Sverre RabbelierJun 10, 2008
  2. Johannes SixtJun 10, 2008
  3. Sverre RabbelierJun 10, 2008
  4. Brandon CaseyJun 10, 2008
  5. Sverre RabbelierJun 10, 2008
  6. Linus TorvaldsJun 10, 2008
  7. Sverre RabbelierJun 10, 2008
  8. Stephan BeyerJun 21, 2008
  9. Linus TorvaldsJun 21, 2008
  10. Linus TorvaldsJun 21, 2008
  11. Stephan BeyerJun 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.