#2043 NORM FRS: We need a "Relative Date" API.

Zarro Boogs per Child bugtracker at laptop.org
Tue Jul 10 13:09:14 EDT 2007


#2043: We need a "Relative Date" API.
--------------------+-------------------------------------------------------
 Reporter:  Eben    |       Owner:  marco
     Type:  defect  |      Status:  new  
 Priority:  normal  |   Milestone:  FRS  
Component:  sugar   |     Version:       
 Keywords:          |    Verified:  0    
--------------------+-------------------------------------------------------
 The HIG goes into detail (in the Journal section) about the use of
 relative dates opposed to absolute ones, in order to map more closely to
 the human capacity for memory and the increase of imprecision over time.
 This means that we want to describe times as 2 minutes ago, 4 hours ago,
 yesterday, 2 days ago, 3 weeks ago, 11 months ago, 2 years ago, etc.

 Obviously this is a little bit tricky, since this API needs to be
 localized.  It becomes even trickier since a few special cases slip in:
 For instance, "yesterday" is a special case for "1 day ago".

 There are a few more subtleties we may also want to handle.  Another major
 distinction is a flag to return a relative date (as in the examples above)
 or to instead return an inclusive range, such as today, since yesterday,
 this week, this month, this year.

 Since we really want to emphasize this attitude toward the passage of
 time, both within the OS and within various activities, we should provide
 a simple API for passing a date object (and a few parameters) and
 receiving a properly formatted (and localized) string.  Since we need this
 in various places within the OS itself - most importantly the Journal - we
 should try to get a basic framework up and running by FRS.

-- 
Ticket URL: <http://dev.laptop.org/ticket/2043>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list