Inconsistent handling of year-only dates depending on value: NOT A REQUEST FOR FUZZY DATES

TalkBug Collectors

Join LibraryThing to post.

Inconsistent handling of year-only dates depending on value: NOT A REQUEST FOR FUZZY DATES

This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.

Oct 18, 2012, 10:58am

This is a repost-with-clarification of the thread here which I closed thinking it was just talking about improper handling of year-only dates. I'm reposting rather than reopening since the issue has been clarified and reopened bugs get little attention.

Essentially, in the "Date started" or "Date stopped" field, the treatment of a year-only date is inconsistent, due to the vagaries of the PHP strtotime function. Four-digit strings (i.e. years) that PHP can parse as a time -- for all practical purposes on the site, anything from 2000 onward though potentially also including anything from 1900 to 1959 -- will result in the current date. Those that PHP cannot parse as a time - from 1960 to 1999 -- will result in the year that was entered, with today's date. This is not, formally, an LT bug but it is certainly unexpected behavior; either of the described behaviors ("failing" from the end-user's viewpoint and returning the current date with a time corresponding to the year that was entered, or returning the year that was entered with today's date) would be better than having one result sometimes and one the other time.

Relevant posts from the earlier thread are brightcopy's initial diagnosis as a strtotime weirdness here, my link to the documentation describing this behavior here, and a suggested workaround here.

Nov 30, 2012, 11:52am


Nov 30, 2012, 3:47pm

Oh, I had not seen this new thread.
I'm sorry, the first thread I have not been able to argue well, because of my unfamiliarity with the English language.
Thanks lorax.

Dec 31, 2012, 12:32pm


Mar 7, 2013, 9:37am


Apr 3, 2013, 6:10pm

I'll take a look at this. I'm bumping it for that reason.

Apr 3, 2013, 6:48pm

So, ConceptDawg has been given dates as his thing—to understand the code, to understand the bugs, to understand the changes people want, the UI, etc. So far he's collaborated on getting them from Goodreads imports. He's off for two days and then the weekend, but, after that, this is going to get solved and nailed down as best as we can.

Apr 3, 2013, 7:42pm

I'd like to see you start a thread about what's going to happen and what people want to happen.

Apr 3, 2013, 7:53pm

Like this one?

Or do you mean a thread after they decide what they are planning to change once the bugs are cleaned?

Apr 3, 2013, 8:10pm

I was thinking about a more general one, not just bug-related.

Also one where I wasn't specifically not invited to post :P

Apr 3, 2013, 8:18pm

Well - they did not say anything about _Zoe_ or Zoë :)
I suspect that it is too early for such a thread but... up to the LT guys. And cD did say that once the bugs are out of the way, he is moving to new features.

Apr 3, 2013, 8:22pm

Well, with Currently Reading in Collections, it was somehow never time for the discussion. First we were doing specific bug-testing in beta, and then the feature was released and the time for discussion had passed. I'm hoping this time will be different.

I also don't think people's thoughts about the issue are changing so rapidly that having the discussion a week or more before the development happens will be a big problem.

Apr 3, 2013, 8:48pm

I'm hoping this time will be different.

Eternal optimism...

Apr 9, 2013, 11:11am

Zoe, I'm going to assume that you know that I was kidding about you not commenting. Also, do you want to briefly describe what you are wanting with Currently Reading in Collections? I think I know but I want to get your current take on things. I've been out of the loop for a bit.

Apr 9, 2013, 11:17am

Thanks, Chris. I honestly wasn't 100% sure that you were kidding. I'll write up a brief description later today.

Apr 9, 2013, 6:16pm

I just wrote this in another thread, and realized that it basically answers your question here:

When you add a book to Currently Reading, bring up a box for Date Started, auto-filled to today. People can click okay to accept the date, or else change it, or just close the box. There will also be options for "don't ask me this again" and "do this automatically in the future".

When you remove a book from Currently Reading, bring up a box for Stopped, auto-filled to today. Again, you can accept the date, or change it, or just close the box; you can tell it never to happen again, or you can tell it to happen automatically.

Similarly for dates --> CR.

It should be straightforward, editing visible catalogue data, with none of the weird implications about what it means if you stop a book without removing it from CR, etc.

Apr 10, 2013, 4:22am

I would love this (16>). It's (more or less) what was suggested way back when, which got derailed with all kinds of what ifs. I use currently reading when I don't finish a book before I mark that I'm starting it; I'd use it more if it went automatically with my dates (the dates --> CR part of Zoe's suggestion). Nice and simple and straightforward, just giving us a quick option to enter stuff (or not) as we wish.

Apr 11, 2013, 4:20am

Ok Zoe. I think those are good ideas. That's how it was supposed to work but things were changed at some point. After I get all the bugs in the current system worked out (there are 3 or 4 primary ones) then I'll see about adding some functionality like this—after getting approval, of course.

Apr 11, 2013, 6:44am

The important thing is the ability to turn it off for those of us who use Currently Reading a bit differently and don't want to have to fiddle with it every time.

I have no real problem with new features that I will never use, as long as I can turn them off easily, never see them again and continue to work the way I always did.

Apr 11, 2013, 7:22am

>18 conceptDawg: Thanks.

>19 MarthaJeanne: Yeah, hence the "don't ask me this again" part. Maybe that terminology needs to be clarified to distinguish it from the "do this automatically" option (which also wouldn't show the box again), but I can't think of a better wording at the moment.

And if course, if you do tell it to never happen/happen automatically, there has to be an out-of-the-way setting somewhere to let you change your mind.

Apr 11, 2013, 7:25am

I'd really much rather there just be something to click on to "set to today's date" rather than all sorts of complex "add this date to this thing at this time" and "always/never do this" etc. I don't want to deal with all that crap, but I would like a simple way to set as today, where I can then easily change it by a day or two if I was slow at adding it, or whatever.

Apr 11, 2013, 7:26am

>21 .Monkey.: Type "today" in the date field.

Edited: Apr 11, 2013, 7:28am

Or yesterday, or Friday...

Now it would be nice if this were in the Book information box so you didn't have to open the edit book page every time to add a new date to your favourite book.

Apr 11, 2013, 7:41am

>22 _Zoe_: Yes, I'm aware of that. It's not the same thing as a one-click date being inserted, which can then be easily changed a few days different.

Apr 11, 2013, 8:11am

>24 .Monkey.: I'm not totally convinced that the effort saved there would be worth the extra UI complication, though I'm also not absolutely opposed to it.

Apr 18, 2013, 2:15pm

We're working on a better interface into your currently reading books so it might be a solution to some of these requests.

The timestamp thing is fixed on the development server but I'm testing it a bit more to make sure there aren't any flaws in my logic (never happens).

Apr 18, 2013, 2:21pm



(Cue pigs flying, Hell freezing, etc.)

Apr 22, 2013, 1:02pm

Since this is a bug that is NOT IN FACT ABOUT FUZZY DATES, can the actual bug here get addressed? (If it gets addressed as part of rolling out fuzzy dates, that's okay too.)

Edited: Apr 22, 2013, 1:14pm

It should be addressed with the same change, yeah.

Apr 29, 2013, 10:18am

If this has been addressed by the recent change, should it be marked as fixed?

Apr 29, 2013, 11:30am

Sure. Done :-)