As suggested I am with G-d's help working on a new 
net.liftweb.http.ConversionRules object, to contain factories for parsers and 
formatters for date, date-time, time java.util.Date objects. Then 
LiftRules.formateDate and .parseDate would be deprecated I suppose.
One question is how to deal with null. The LiftRules implementation for 
formatDate replaces null with new Date(0L), and parseDate returns Empty for a 
null input.
1. Should these functions worry about null? Maybe it's the caller's 
responsibility, such as net.liftweb.mapper.MappedDate.
2. If they should think about null, parseXXX returns a Box anyway because a 
string may not parse, and null certainly doesn't parse and should thus return 
Empty. However how should formatXXX deal with null? Here are some suggestions; 
any others are welcome.
  (a) Return an empty string - ""
  (b) Return something like " (no selection)" etc.
  (c) formatXXX should also return a Box, which would be Empty for null
  (d) Behave as though new Date(0L) was passed in
  (e) Behave as though new Date was passed in
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to