04th Sep 2003
FlexiPhoto: Time Spanned
I’m following up from yesterday’s entry FlexiPhoto Collections, Spanning Time. I made a lot of progress on it.
I was writing about the idea of specifying starting and ending dates for a photo collection. An easy UI to this from a browser is to have HTML select menus (popup menus, whatever you want to call them this week). I do have that in FlexiPhoto, and that bit is very straightforward.
The more interesting bit is to provide a text input field for users to specify a range of dates. Why? So that they can copy & paste dates from elsewhere, as one example …
So I wrote most of the date parsing code yesterday, and am doing my best to let users be absolutely lazy in how they specify ranges of dates. (trying to live up to the “Flexible” in “FlexiPhoto” …)
Here’s some of my test suite, and the results:
"2002-02-03, 2005": 2002-02-03 to 2005-12-31
"2002-02-03, 2005-9": 2002-02-03 to 2005-9-30
"2002-02-03": 2002-02-03 to 2002-02-03
"1999-05, 2001-1": 1999-05-1 to 2001-1-31
"2001": 2001-1-1 to 2001-12-31
"2000-5, now": 2000-5-1 to 2003-09-04
"now, 2004": 2003-09-04 to 2004-12-31
"now": 2003-09-04 to 2003-09-30 // bug!
I’m aware of a couple of bugs, but it’s encouraging to get most of the obvious cases worked out so quickly. I’ll no doubt hear from someone wondering about hours, minutes, and seconds. I’ll just say that I am writing it in such a way where the door is definitely open to that.
I’m following up from yesterday’s entry FlexiPhoto Collections, Spanning Time. I made a lot of progress on it.
I was writing about the idea of specifying starting and ending dates for a photo collection. An easy UI to this from a browser is to have HTML select menus (popup menus, whatever you want to call them this week). I do have that in FlexiPhoto, and that bit is very straightforward.
The more interesting bit is to provide a text input field for users to specify a range of dates. Why? So that they can copy & paste dates from elsewhere, as one example …
So I wrote most of the date parsing code yesterday, and am doing my best to let users be absolutely lazy in how they specify ranges of dates. (trying to live up to the “Flexible” in “FlexiPhoto” …)
Here’s some of my test suite, and the results:
"2002-02-03, 2005": 2002-02-03 to 2005-12-31 "2002-02-03, 2005-9": 2002-02-03 to 2005-9-30 "2002-02-03": 2002-02-03 to 2002-02-03 "1999-05, 2001-1": 1999-05-1 to 2001-1-31 "2001": 2001-1-1 to 2001-12-31 "2000-5, now": 2000-5-1 to 2003-09-04 "now, 2004": 2003-09-04 to 2004-12-31 "now": 2003-09-04 to 2003-09-30 // bug!
I’m aware of a couple of bugs, but it’s encouraging to get most of the obvious cases worked out so quickly. I’ll no doubt hear from someone wondering about hours, minutes, and seconds. I’ll just say that I am writing it in such a way where the door is definitely open to that.
Posted in FlexiPhoto | Comments Off