ITeye博客

发现jbpm BusinessCalendar的bug

hongsoft · 2006-02-28 20:45 · Markdown

BusinessCalendar真的是非常有用,让我们对付 刁难的客户时不用那么

心惊胆颤了,但今天竟然发现一个BUG,开始以为是自己的问题,到后来不得不

转到junit:

public void testyhb() throws Exception {  

   Calendar calendar = BusinessCalendar.getCalendar();
   calendar.set(Calendar.YEAR, 2005);
   calendar.set(Calendar.MONTH, Calendar.APRIL);
   calendar.set(Calendar.DAY_OF_MONTH, 4);
   calendar.set(Calendar.HOUR_OF_DAY, 11);
   calendar.set(Calendar.MINUTE, 35);
   calendar.set(Calendar.SECOND, 0);
   calendar.set(Calendar.MILLISECOND, 0);
   Date date1 = calendar.getTime();
   System.out.println(date1);

   Date date2 =
   businessCalendar.add(date1, new Duration("2 business hours"));

   System.out.println(date2); 

   }

run了一把:

20:26:30,046 [main] INFO  JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'
20:26:30,187 [main] DEBUG JbpmConfiguration : creating jbpm configuration from input stream
Mon Apr 04 11:35:00 CST 2005
Tue Apr 05 10:35:00 CST 2005

差别是相-----当的大,看了看旁边的clover.jar,哎,clover也管不了这个呀。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。