Changed something recently? Your page seems to be causing Sharpreader to start the debugger.
a) What are you trying to accomplish? b) Rather than a simple text field, I'd use dropdowns (maybe leaving the year as text):
[08] [Apr] [2004]
c) What should happen when I add 1 month to Jan 31st? I think it's ambiguous enough that you're going to suprise some users whatever you do. I'd look for an alternative way to do whatever you're trying to do, one that makes the user feel more certain about what's about to happen. Maybe something graphical is better in this instance.
d) 2004-07-32 + 4 Months = crash and burn. Yeah, I know, it's only a demo, but (b) above and some judicious javascript might help.
e) I have no idea what possible strings I can use. I'm guessing month, week, day, year, but I'm not sure. Can I use quarter? Decade? Suggest a drop-down with permitted fields, again.
b) That's one way of doing it. This page is about another way.
c) From my limited research; in the English language if you say "one month from now" on the 31st of January you mean the last day of February, i.e. 28th or 29th.
d) 2004-07-32 does not exist.
e) I get your point. The hope is to make the user understand that he can write whatever he likes. The experiment here is to pretend to be smart and let users be able to express their input in plain english. Like voice commands for mobile phones do.
Comment
Changed something recently? Your page seems to be causing Sharpreader to start the debugger.
a) What are you trying to accomplish?
b) Rather than a simple text field, I'd use dropdowns (maybe leaving the year as text):
[08] [Apr] [2004]
c) What should happen when I add 1 month to Jan 31st? I think it's ambiguous enough that you're going to suprise some users whatever you do. I'd look for an alternative way to do whatever you're trying to do, one that makes the user feel more certain about what's about to happen. Maybe something graphical is better in this instance.
2004-01-31 + 1 Month = 2004-03-01
2004-07-31 + 4 Months = 2004-07-31
Hmm. That doesn't make sense to me.
d) 2004-07-32 + 4 Months = crash and burn. Yeah, I know, it's only a demo, but (b) above and some judicious javascript might help.
e) I have no idea what possible strings I can use. I'm guessing month, week, day, year, but I'm not sure. Can I use quarter? Decade? Suggest a drop-down with permitted fields, again.
Replies
a) The equivalent of the interval function in PostgreSQL. (see http://www.peterbe.com/Adding-a-year-in-PostgreSQL)
b) That's one way of doing it. This page is about another way.
c) From my limited research; in the English language if you say "one month from now" on the 31st of January you mean the last day of February, i.e. 28th or 29th.
d) 2004-07-32 does not exist.
e) I get your point. The hope is to make the user understand that he can write whatever he likes. The experiment here is to pretend to be smart and let users be able to express their input in plain english. Like voice commands for mobile phones do.