class Date

def to_s_lex(precision = :day)

return:: a lexicographically sortable string representing the date
options are :year, :month and :day
precision:: the precision required in the string version of the date. The

precision. The format used is %Y%m%d
Convert the Date to a lexicographically sortable string with the required
def to_s_lex(precision = :day)
  self.strftime(Time::LEX_FORMAT[precision])
end