class Time
def to_s_lex(precision = :day)
options are :year, :month, :day, :hour, :minute and :second
precision:: the precision required in the string version of the time. The
precision. The format used is %Y%m%d %H:%M:%S.
Convert the Time to a lexicographically sortable string with the required
def to_s_lex(precision = :day) self.strftime(LEX_FORMAT[precision]) end