You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/10/14 14:09:53 UTC
svn commit: r1022477 - in /pivot/trunk:
tests/src/org/apache/pivot/tests/issues/pivot_652.bxml
wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
Author: gbrown
Date: Thu Oct 14 12:09:53 2010
New Revision: 1022477
URL: http://svn.apache.org/viewvc?rev=1022477&view=rev
Log:
Resolve PIVOT-652.
Added:
pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_652.bxml
Modified:
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
Added: pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_652.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_652.bxml?rev=1022477&view=auto
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_652.bxml (added)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/issues/pivot_652.bxml Thu Oct 14 12:09:53 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<Window title="PIVOT-652" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns="org.apache.pivot.wtk">
+ <BoxPane>
+ <Border>
+ <Calendar locale="{language:'fr', country:'fr'}" year="2013" month="8"/>
+ </Border>
+ </BoxPane>
+</Window>
Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java?rev=1022477&r1=1022476&r2=1022477&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java Thu Oct 14 12:09:53 2010
@@ -622,8 +622,8 @@ public class TerraCalendarSkin extends C
Locale locale = calendar.getLocale();
GregorianCalendar gregorianCalendar = new GregorianCalendar(locale);
gregorianCalendar.set(year, month, 1);
- int firstIndex = gregorianCalendar.get(java.util.Calendar.DAY_OF_WEEK)
- - gregorianCalendar.getFirstDayOfWeek();
+ int firstIndex = (7 + gregorianCalendar.get(java.util.Calendar.DAY_OF_WEEK)
+ - gregorianCalendar.getFirstDayOfWeek()) % 7;
int lastIndex = firstIndex + gregorianCalendar.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
// Determine the last day of last month