See David's last post on this thread, and the updated diff on RB.
-
Jeppe Nejsum Madsenje...@ingolfs.dk wrote:
Naftoli Gugenheim naftoli...@gmail.com writes:
Would it be a bad idea to use java.util.Date for now, and if and when support
is added for
When are the implicits on a companion object invoked without needing to be
imported?
-
Jeppe Nejsum Madsenje...@ingolfs.dk wrote:
Naftoli Gugenheim naftoli...@gmail.com writes:
Would it be a bad idea to use java.util.Date for now, and if and when support
Would it be a bad idea to use java.util.Date for now, and if and when support
is added for JodaTime, change it to a DateHolder (which would be added then)?
-
David Pollakfeeder.of.the.be...@gmail.com wrote:
A ConversionRules singleton is the wrong concept.
Naftoli Gugenheim naftoli...@gmail.com writes:
Would it be a bad idea to use java.util.Date for now, and if and when support
is added for JodaTime, change it to a DateHolder (which would be added then)?
Haven't looked in detail, but wouldn't this require two changes to
client code?
1) One to
Oh, right--I forgot about per-session and request.
So what do you vote on this, then:
A. ConversionRules is its own singleton, but as a bonus it can also be accessed
from LiftRules.
B. Same as A but ConversionRules is private[liftweb], so there's only one path.
C. Less redundant: define (a
A ConversionRules singleton is the wrong concept.
What you want is:
case class DateHolder(date: JodaTime) {
implicit def asJt: JodaTime = date
implicit def asJavaDate: java.util.Date = // convert to Java date here
}
object DateHolder {
implicit def dateToDH(in: java.util.Date): DateHolder
Sounds good!
-
David Pollakfeeder.of.the.be...@gmail.com wrote:
A ConversionRules singleton is the wrong concept.
What you want is:
case class DateHolder(date: JodaTime) {
implicit def asJt: JodaTime = date
implicit def asJavaDate: java.util.Date = //
Hi, I'd like to get some opinions on the following.
You may want to read http://reviewboard.liftweb.net/r/158/.
I have on Review Board a patch for some date-and-time parsing and formatting
configuration. I put the settings inside a singleton object called
ConversionRules.
The question is, where
We were talking in another thread about having something kind of similar to
this where the configuration is held in lift-util (maybe lift-common) but it is
accessible through LiftRules. I think it could be a good idea to do this for
this as well, to help guide people to the right place for this