Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Automatic completion of dates to "wrong" format (Read 5286 times)
David Bertenshaw
Full Member
*
Offline



Posts: 182

Automatic completion of dates to "wrong" format
May 25th, 2012, 5:18am
 
I searched to see if this has come up before, but couldn't find a search phrase that works...

I like the automatic input help when entering dates -- e.g. if I put in 12/5, TBX will complete the date and time. Unfortunately the conversion insists on using US format even though all my settings are for the UK: e.g.: 12/5 (the 12th of May) is changed to 5/12 (5th of December). The 23/5 results in "never" of course.

Shouldn't the conversion pick up the date format from the OS settings?

Only a minor point...
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Automatic completion of dates to
Reply #1 - May 25th, 2012, 6:17am
 
I confirm (using v5.11.1) that my Mac gets the same result. You didn't mention your specific locale setting but I'll assume it's UK - some TB users write/use formats other than their OS settings, which can muddy the waters. The Mac UK-locale short form date is dd/mm/yyyyy, so 5 Dec 2012 is 05/12/2012. My Mac is set to UK locale and does replicate your issue. I'd also read 12/2010 as shorthand for 01/12/2010.

Guessing intended date form text input is a challenge for code, but I'd agree that if locale is UK, indeed anything other than USA/Philippines then day-month order is a more sensible default guess - see why. However, despite that map, my hunch is m/d format users are the larger sub-set of TB users. In fairness, the app's author is American and falling back to one's own native format isn't illogical.

Anyway, I'll report this to support. I suspect it's a matter of reviewing the order the TB tests it's data assumptions.
Back to top
 
« Last Edit: May 25th, 2012, 6:21am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
David Bertenshaw
Full Member
*
Offline



Posts: 182

Re: Automatic completion of dates to "wrong" format
Reply #2 - May 25th, 2012, 6:28am
 
Thanks Mark -- I too suspected it's just the carry-over from a default assumption. No big deal -- just a loose end to be tided up if possible.

Regards

David

Back to top
 
 
  IP Logged
Johnnie Wilcox - mistersquid
Full Member
*
Offline



Posts: 84
San Francisco, CA
Re: Automatic completion of dates to
Reply #3 - May 28th, 2012, 10:02pm
 
I'm chiming in because this issue comes up for me every now and again. I'm a US user with specific custom settings that don't conform to any expected standard (ICU yMMdd which presents as YYYYMMDD). OS-level date support would prevent some unexpected (and not always immediately detectable) behavior for agents that filter on date.

I've emailed support and have requested OS-level date support as a feature.
Back to top
 
« Last Edit: May 28th, 2012, 10:03pm by Johnnie Wilcox - mistersquid »  
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Automatic completion of dates to "wrong" format
Reply #4 - May 29th, 2012, 2:54pm
 
When Tinderbox converts strings to dates, it runs through a long checklist of possibilities.  Here's a rough summary, which may explain why things work as they do.

FIRST, we recognize special keywords like "today" and "yesterday".  If we find those, we handle them and we're done.

NEXT, we ask the system to parse the date using your local format. If the system can do this, we're done. (This is what Johnnie Wilcox is requesting, and it's already implemented. But the system is not very forgiving of small lapses or missing data, so it's not hard to make the system fail to parse the date.)

NEXT, we try a bunch of hand-written fallback routines. For example, if the system can't parse the date but it looks like an American date, we try that, using a parser that's more tolerant than the system's. This is bad for the UK, unfortunately, as the original poster observed.

NEXT, we try various internet protocol data formats.

If nothing works, we give up.

Back to top
 
 
WWW   IP Logged
Pages: 1
Send Topic Print