From: "alexeymuranov (Alexey Muranov)" Date: 2012-10-12T21:40:52+09:00 Subject: [ruby-core:47942] [ruby-trunk - Feature #7114] New classes: `HumanTime::LocalTime`, `HumanTime::Duration` Issue #7114 has been updated by alexeymuranov (Alexey Muranov). In my opinion, the most important method of `HumanTime::LocalTime` would be `initialize` ;). It would need to be able to take the number of hours and minutes, or a string and a pattern description, and store it as "hh:mm:ss", with or without the timezone. The main "problem" with `Time` is that it cannot store relative time, time of day, or duration. By the way, i do not think that the inner working of a class is not a part of its specification: the method implementation maybe is not, but i think that knowing what exactly is stored as the state of an object and in which format (as conversion between formats may either take time or be not lossless) is a part of a class specification. This is why i think that a class that stores the number of seconds from Epoch is not well suited for keeping a shop open hours or something human like this. I do not have a precise idea about the class interface for now. ---------------------------------------- Feature #7114: New classes: `HumanTime::LocalTime`, `HumanTime::Duration` https://bugs.ruby-lang.org/issues/7114#change-30436 Author: alexeymuranov (Alexey Muranov) Status: Feedback Priority: Normal Assignee: Category: Target version: =begin As suggested by *drbrain* in #7113 , here is a separate request for classes to hold the time of day and duration of time. Ruby currently does not have a class to represent a standard database "time" column. Using (({Time})) for this causes some difficulties for example to users of *Ruby on Rails*: http://www.rebeccablyth.co.uk/2008/01/03/time-columns-and-rails/ =end -- http://bugs.ruby-lang.org/