Author: adrianc
Date: Fri Jul 10 15:39:21 2009 New Revision: 792987 URL: http://svn.apache.org/viewvc?rev=792987&view=rev Log: Conversion from java.util.Calendar to com.ibm.icu.util.Calendar. I didn't convert the Cloud component - I wasn't sure if the Calendar class was being passed through SOAP. OFBiz users who have modifications or add-ons can make the same substitution to get them to compile. I'll let the dust settle from this, then I'll add the user-selected calendar capability. Added: ofbiz/trunk/framework/base/lib/icu4j-4_2_1.jar (with props) Removed: ofbiz/trunk/framework/base/lib/icu4j-3_6.jar Modified: ofbiz/trunk/.classpath ofbiz/trunk/LICENSE ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java ofbiz/trunk/framework/bi/src/org/ofbiz/bi/util/DimensionServices.java ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncServices.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetCalendar.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionWorker.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java Modified: ofbiz/trunk/.classpath URL: http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/.classpath (original) +++ ofbiz/trunk/.classpath Fri Jul 10 15:39:21 2009 @@ -86,7 +86,7 @@ <classpathentry kind="lib" path="framework/base/lib/juel-2.1.1.jar"/> <classpathentry kind="lib" path="framework/base/lib/jdbm-1.0.jar"/> <classpathentry kind="lib" path="framework/base/lib/jakarta-regexp-1.5.jar"/> - <classpathentry kind="lib" path="framework/base/lib/icu4j-3_6.jar"/> + <classpathentry kind="lib" path="framework/base/lib/icu4j-4_2_1.jar"/> <classpathentry kind="lib" path="framework/base/lib/httpunit.jar"/> <classpathentry kind="lib" path="framework/base/lib/avalon-framework-4.2.0.jar"/> <classpathentry kind="lib" path="framework/base/lib/avalon-util-exception-1.0.0.jar"/> Modified: ofbiz/trunk/LICENSE URL: http://svn.apache.org/viewvc/ofbiz/trunk/LICENSE?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/LICENSE (original) +++ ofbiz/trunk/LICENSE Fri Jul 10 15:39:21 2009 @@ -1221,7 +1221,7 @@ ========================================================================= The following libraries distributed with Apache OFBiz are licensed under the MIT/X License: -ofbiz/trunk/framework/base/lib/icu4j_3_6.jar +ofbiz/trunk/framework/base/lib/icu4j-4_2_1.jar ofbiz/trunk/framework/entity/lib/ofbiz-minerva.jar ofbiz/trunk/framework/jetty/lib/jcl104-over-slf4j-1.3.1.jar ofbiz/trunk/framework/jetty/lib/slf4j-api-1.3.1.jar Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.Iterator; Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.List; import java.util.Map; import java.util.Properties; Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/GlAccountTrialBalance.groovy Fri Jul 10 15:39:21 2009 @@ -23,7 +23,7 @@ import org.ofbiz.base.util.UtilValidate; import org.ofbiz.accounting.util.UtilAccounting; import java.math.BigDecimal; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; if (organizationPartyId) { context.currentOrganization = delegator.findOne("PartyNameView", [partyId : organizationPartyId], false); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.math.BigDecimal; import java.nio.ByteBuffer; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Iterator; import java.util.List; import java.util.Map; Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ import java.sql.Time; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Fri Jul 10 15:39:21 2009 @@ -36,10 +36,11 @@ <if-not-empty field="monthsToInclude"> <now-timestamp field="nowTimestamp"/> + <!-- TODO: Change this to use the <set-calendar> operation --> <call-bsh><![CDATA[ - calendar = java.util.Calendar.getInstance(); + calendar = com.ibm.icu.util.Calendar.getInstance(); calendar.setTimeInMillis(nowTimestamp.getTime()); - calendar.add(java.util.Calendar.MONTH, -monthsToInclude.intValue()); + calendar.add(com.ibm.icu.util.Calendar.MONTH, -monthsToInclude.intValue()); parameters.put("fromDate", new Timestamp(calendar.getTimeInMillis())); ]]></call-bsh> <set from-field="nowTimestamp" field="parameters.thruDate"/> @@ -1336,4 +1337,4 @@ </else> </if-compare-field> </simple-method> -</simple-methods> \ No newline at end of file +</simple-methods> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Fri Jul 10 15:39:21 2009 @@ -22,7 +22,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Iterator; Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.HashMap; @@ -5257,4 +5257,4 @@ } return ServiceUtil.returnSuccess(); } -} \ No newline at end of file +} Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Fri Jul 10 15:39:21 2009 @@ -22,7 +22,7 @@ import java.math.MathContext; import java.sql.Timestamp; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.security.SecureRandom; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Fri Jul 10 15:39:21 2009 @@ -182,11 +182,12 @@ </else> </if-not-empty> </if-empty> + <!-- TODO: Convert this to a <set-calendar> operation --> <call-bsh><![CDATA[ java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate"); - java.util.Calendar cal = java.util.Calendar.getInstance(); + com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance(); cal.setTimeInMillis(orderDate.getTime()); - cal.add(java.util.Calendar.DAY_OF_YEAR, daysToShip.intValue()); + cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue()); return org.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis())); ]]></call-bsh> @@ -248,11 +249,12 @@ </else> </if-not-empty> </if-empty> + <!-- TODO: Convert this to a <set-calendar> operation --> <call-bsh><![CDATA[ java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate"); - java.util.Calendar cal = java.util.Calendar.getInstance(); + com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance(); cal.setTimeInMillis(orderDate.getTime()); - cal.add(java.util.Calendar.DAY_OF_YEAR, daysToShip.intValue()); + cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue()); return org.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis())); ]]></call-bsh> @@ -478,11 +480,12 @@ <if-empty field="daysToShip"> <set field="daysToShip" value="30" type="Long"/> </if-empty> + <!-- TODO: Convert this to a <set-calendar> operation --> <call-bsh><![CDATA[ java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate"); - java.util.Calendar cal = java.util.Calendar.getInstance(); + com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance(); cal.setTimeInMillis(orderDate.getTime()); - cal.add(java.util.Calendar.DAY_OF_YEAR, daysToShip.intValue()); + cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue()); return org.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis())); ]]></call-bsh> </simple-method> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.List; import java.util.Map; import java.util.Set; Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.List; import java.util.Map; Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalRecurConverter.java Fri Jul 10 15:39:21 2009 @@ -30,10 +30,12 @@ import net.fortuna.ical4j.model.property.*; import org.ofbiz.service.calendar.TemporalExpression; -import org.ofbiz.service.calendar.TemporalExpressions; import org.ofbiz.service.calendar.TemporalExpressionVisitor; +import org.ofbiz.service.calendar.TemporalExpressions; import org.ofbiz.service.calendar.TemporalExpressions.*; +import com.ibm.icu.util.Calendar; + /** Temporal Expression to iCalendar recurrence converter. The conversion results * (or conversion success) are unpredictable since the OFBiz Temporal Expressions * are more sophisticated than iCalendar recurrences. This class attempts to @@ -156,8 +158,8 @@ dayList.add(dayOfWeekArray[startDay - 1]); while (startDay != endDay) { startDay++; - if (startDay > java.util.Calendar.SATURDAY) { - startDay = java.util.Calendar.SUNDAY; + if (startDay > Calendar.SATURDAY) { + startDay = Calendar.SUNDAY; } dayList.add(dayOfWeekArray[startDay - 1]); } @@ -170,14 +172,14 @@ public void visit(TemporalExpressions.MonthRange expr) { int startMonth = expr.getStartMonth(); int endMonth = expr.getEndMonth(); - java.util.Calendar cal = java.util.Calendar.getInstance(); - int maxMonth = cal.getActualMaximum(java.util.Calendar.MONTH); + Calendar cal = Calendar.getInstance(); + int maxMonth = cal.getActualMaximum(Calendar.MONTH); NumberList monthList = new NumberList(); monthList.add(startMonth + 1); while (startMonth != endMonth) { startMonth++; if (startMonth > maxMonth) { - startMonth = java.util.Calendar.JANUARY; + startMonth = Calendar.JANUARY; } monthList.add(startMonth + 1); } @@ -214,17 +216,17 @@ int freqCount = expr.getFreqCount(); int freqType = expr.getFreqType(); switch (freqType) { - case java.util.Calendar.SECOND: + case Calendar.SECOND: this.state.addRecur((new Recur(Recur.SECONDLY, freqCount))); - case java.util.Calendar.MINUTE: + case Calendar.MINUTE: this.state.addRecur((new Recur(Recur.MINUTELY, freqCount))); - case java.util.Calendar.HOUR: + case Calendar.HOUR: this.state.addRecur((new Recur(Recur.HOURLY, freqCount))); - case java.util.Calendar.DAY_OF_MONTH: + case Calendar.DAY_OF_MONTH: this.state.addRecur((new Recur(Recur.DAILY, freqCount))); - case java.util.Calendar.MONTH: + case Calendar.MONTH: this.state.addRecur((new Recur(Recur.MONTHLY, freqCount))); - case java.util.Calendar.YEAR: + case Calendar.YEAR: this.state.addRecur((new Recur(Recur.YEARLY, freqCount))); } } Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original) +++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ package org.ofbiz.workeffort.workeffort; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.List; @@ -392,7 +392,7 @@ * <ul> * <li>start - TimeStamp (Period start date/time)</li> * <li>numPeriods - Integer</li> - * <li>periodType - Integer (see java.util.Calendar)</li> + * <li>periodType - Integer (see com.ibm.icu.util.Calendar)</li> * <li>eventStatus - String</li> * <li>partyId - String</li> * <li>partyIds - List</li> Added: ofbiz/trunk/framework/base/lib/icu4j-4_2_1.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/icu4j-4_2_1.jar?rev=792987&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/base/lib/icu4j-4_2_1.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.base.util; import java.io.Serializable; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; /** A representation of a period of time. */ @SuppressWarnings("serial") Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java Fri Jul 10 15:39:21 2009 @@ -25,7 +25,6 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; -import java.util.Calendar; import java.util.Date; import java.util.LinkedList; import java.util.List; @@ -33,7 +32,7 @@ import java.util.Map; import java.util.TimeZone; -import javolution.util.FastMap; +import com.ibm.icu.util.Calendar; /** * Utility class for handling java.util.Date, the java.sql data/time classes and related @@ -300,7 +299,7 @@ return getWeekEnd(stamp, TimeZone.getDefault(), Locale.getDefault()); } - public static java.util.Calendar toCalendar(java.sql.Timestamp stamp) { + public static com.ibm.icu.util.Calendar toCalendar(java.sql.Timestamp stamp) { Calendar cal = Calendar.getInstance(); if (stamp != null) { cal.setTimeInMillis(stamp.getTime()); @@ -760,6 +759,10 @@ // ----- New methods that take a timezone and locale -- // + public static Calendar getCalendarInstance(TimeZone timeZone, Locale locale) { + return Calendar.getInstance(com.ibm.icu.util.TimeZone.getTimeZone(timeZone.getID()), locale); + } + /** * Returns a Calendar object initialized to the specified date/time, time zone, * and locale. @@ -768,10 +771,10 @@ * @param timeZone * @param locale * @return Calendar object - * @see java.util.Calendar + * @see com.ibm.icu.util.Calendar */ public static Calendar toCalendar(Date date, TimeZone timeZone, Locale locale) { - Calendar cal = Calendar.getInstance(timeZone, locale); + Calendar cal = getCalendarInstance(timeZone, locale); if (date != null) { cal.setTime(date); } @@ -783,12 +786,12 @@ * perform date/time arithmetic across locales and time zones. * * @param stamp date/time to perform arithmetic on - * @param adjType the adjustment type to perform. Use one of the java.util.Calendar fields. + * @param adjType the adjustment type to perform. Use one of the com.ibm.icu.util.Calendar fields. * @param adjQuantity the adjustment quantity. * @param timeZone * @param locale * @return adjusted Timestamp - * @see java.util.Calendar + * @see com.ibm.icu.util.Calendar */ public static Timestamp adjustTimestamp(Timestamp stamp, int adjType, int adjQuantity, TimeZone timeZone, Locale locale) { Calendar tempCal = toCalendar(stamp, timeZone, locale); @@ -1140,11 +1143,9 @@ } public static Date getEarliestDate() { - // According to java.util.Calendar docs, earliest accurate date - // using Gregorian calendar is March 1, 4 AD. - Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - cal.set(Calendar.YEAR, 4); - cal.set(Calendar.MONTH, Calendar.MARCH); + Calendar cal = getCalendarInstance(TimeZone.getTimeZone("GMT"), Locale.getDefault()); + cal.set(Calendar.YEAR, cal.getActualMinimum(Calendar.YEAR)); + cal.set(Calendar.MONTH, cal.getActualMinimum(Calendar.MONTH)); cal.set(Calendar.DAY_OF_MONTH, 1); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); @@ -1154,9 +1155,8 @@ } public static Date getLatestDate() { - // Return last day of 2999 AD. - Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - cal.set(Calendar.YEAR, 2999); + Calendar cal = getCalendarInstance(TimeZone.getTimeZone("GMT"), Locale.getDefault()); + cal.set(Calendar.YEAR, cal.getActualMaximum(Calendar.YEAR)); cal.set(Calendar.MONTH, cal.getActualMaximum(Calendar.MONTH)); cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH)); cal.set(Calendar.HOUR_OF_DAY, 23); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Fri Jul 10 15:39:21 2009 @@ -30,7 +30,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.Arrays; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Currency; import java.util.Enumeration; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.base.util; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import org.apache.commons.validator.EmailValidator; Modified: ofbiz/trunk/framework/bi/src/org/ofbiz/bi/util/DimensionServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/bi/src/org/ofbiz/bi/util/DimensionServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/bi/src/org/ofbiz/bi/util/DimensionServices.java (original) +++ ofbiz/trunk/framework/bi/src/org/ofbiz/bi/util/DimensionServices.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ import java.sql.Timestamp; import java.text.SimpleDateFormat; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/uom/UomWorker.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import org.ofbiz.entity.GenericDelegator; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.sql.Timestamp; /** Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncServices.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncServices.java (original) +++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncServices.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ import java.sql.Timestamp; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Collections; import java.util.Iterator; Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetCalendar.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetCalendar.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetCalendar.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/SetCalendar.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.minilang.method.envops; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Locale; import java.util.TimeZone; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java Fri Jul 10 15:39:21 2009 @@ -234,6 +234,8 @@ return "integer"; } else if (ObjectType.instanceOf(java.util.Calendar.class, this.type)) { return "dateTime"; + } else if (ObjectType.instanceOf(com.ibm.icu.util.Calendar.class, this.type)) { + return "dateTime"; } else if (ObjectType.instanceOf(java.util.Date.class, this.type)) { return "dateTime"; } else if (ObjectType.instanceOf(java.lang.Long.class, this.type)) { Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.service; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.LinkedList; import java.util.List; import java.util.Locale; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.List; import java.util.Locale; import java.util.Map; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.service.calendar; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.Iterator; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.service.calendar; import java.util.Arrays; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.service.calendar; import java.io.Serializable; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Set; import java.util.TreeSet; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionWorker.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionWorker.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionWorker.java Fri Jul 10 15:39:21 2009 @@ -18,7 +18,7 @@ *******************************************************************************/ package org.ofbiz.service.calendar; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.List; import java.util.Set; import java.util.TreeSet; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.service.calendar; import java.io.Serializable; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.Set; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java Fri Jul 10 15:39:21 2009 @@ -20,7 +20,7 @@ import java.io.IOException; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Map; Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.webapp.stats; import java.net.InetAddress; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Fri Jul 10 15:39:21 2009 @@ -23,7 +23,7 @@ import java.io.StringReader; import java.io.StringWriter; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.HashSet; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Fri Jul 10 15:39:21 2009 @@ -21,7 +21,7 @@ import java.io.IOException; import java.io.StringWriter; import java.sql.Timestamp; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.HashSet; import java.util.Iterator; import java.util.List; Modified: ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java?rev=792987&r1=792986&r2=792987&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java (original) +++ ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java Fri Jul 10 15:39:21 2009 @@ -19,7 +19,7 @@ package org.ofbiz.workflow.impl; import java.util.ArrayList; -import java.util.Calendar; +import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.HashMap; |
Free forum by Nabble | Edit this page |