3 ms·
The point I am making is that if a web site has a feature "post something for 30 days", it is fairly reasonable to implement that as "expires = now() + '30 days
by saurik 14y ago
The point I am making is that if a web site has a feature "post something for 30 days", it is fairly reasonable to implement that as "expires = now() + '30 days'::interval" in your database, and then to display a simplified timestamp like "'expires on ' || date_trunc('day', expires)" when telling people about the deadline.
Yes: it might be nice to say "expires at exactly 16:25:43.642109 UTC on Aug 9 2012", but for most use cases "expires on 8/9/2012" is considered fine. With this interpretation, even if the website said "August 9th", you can still argue that it was being fair and even correct, albeit confusing and bothersome in a way that will certainly have caused some people to think there was more time when there wasn't.
- rhizome 14y agoWhich raises the question of why to cut it off in that way. Why would that kind of precision be necessary? Are we supposed to believe that the coder doesn't know how to do anything but Time.now+30.days?
- enjo 14y agoIs this a serious question? Anyone who has been around "professional" software development for more than 30 minutes wouldn't be surprised by this at all.
- rhizome 14y agoAnybody who has been around professional (without quotes) software development wouldn't make as facile an analogy.
- enjo 14y agoIs this a serious question? Anyone who has been around "professional" software development for more than 30 minutes wouldn't be surprised by this at all.
- stretchwithme 14y agoIts not difficult to believe that the requirement was vague and the coder did the simplest thing to meet it.
- rhizome 14y agoHow is it simpler than Date.today+30.days?
- stretchwithme 14y agoIts not. Time.now + 30.days is exactly as simple.
- rhizome 14y agoWhat do you a req or spec for that feature would look like?
- stretchwithme 14y agoexpire it 30 days from the time its created as opposed to: expire it 30 days from the start of the day that its created the former seems simpler to me and more likely