On Thu, Oct 29, 2009 at 8:06 AM, Christopher Schultz
<[email protected]> wrote:
> Nathan,
>
> On 10/29/2009 11:02 AM, Christopher Schultz wrote:
>> I like re-coding into SimpleDataFormat better.
>
> D'oh: that's not possible because DateFormat doesn't expose the pattern
> it's using, so I'll have to return something unrelated. Hmm. I'm not a
> big fan of NULL but it's also not exactly consistent with the API if an
> error message is returned.
>
> Any ideas other than NULL?

Not really, because a) it's unlikely to ever occur in practice and b)
that's the traditional VelocityTools response to bad inputs.  If you
call $date.toLocalizedPattern($invalidInput) then that's little better
than $date.noSuchMethod($validinput).  Either way, part of the
reference is invalid, and we want to render it as an invalid
reference.  Returning null accomplishes that.

> Thanks,
> -chris
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to