Added
Partial.isMatch(ReadablePartial)

Stephen

P.Hill & E. Goodall wrote:
> Just thought I'd ask a simple question:
> If I'm comparing a partial to a LocalDate is the quickest route
> for the programmer and for execution is to convert to a DateTime using 
> localDate.toDateTimeAtMidnight() and then use partial.isMatch()?
> 
> -Paul
> 
> See JUnit code below.
> 
> @Test
> public void dayOfWeekCompareTest() {
> 
> Partial tuesdays = new Partial(
>                       new DateTimeFieldType[] {dayOfWeek()},
>                       new int[] {TUESDAY}
>               );
> LocalDate localDate;
> localDate = new LocalDate(2007, 7, 17);       // a Tuesday
> 
> assertEquals(true, tuesdays.isMatch(localDate.toDateTimeAtMidnight()));       
>         
>               localDate = new LocalDate(2007, 7, 17); // NOT a Tuesday
>               assertEquals(false,
> tuesdays.isMatch(localDate.toDateTimeAtMidnight()));          
> }
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to