CalendarDataProviderImpl.java revision 6116:5d3f8f9e6c58
1100978Srwatson/* 2173095Srwatson * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 3145167Srwatson * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4163606Srwatson * 5100978Srwatson * This code is free software; you can redistribute it and/or modify it 6100978Srwatson * under the terms of the GNU General Public License version 2 only, as 7100978Srwatson * published by the Free Software Foundation. 8100978Srwatson * 9106392Srwatson * This code is distributed in the hope that it will be useful, but WITHOUT 10106392Srwatson * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11106392Srwatson * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12106392Srwatson * version 2 for more details (a copy is included in the LICENSE file that 13100978Srwatson * accompanied this code). 14147784Srwatson * 15147784Srwatson * You should have received a copy of the GNU General Public License version 16147784Srwatson * 2 along with this work; if not, write to the Free Software Foundation, 17100978Srwatson * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18100978Srwatson * 19100978Srwatson * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20100978Srwatson * or visit www.oracle.com if you need additional information or have any 21100978Srwatson * questions. 22100978Srwatson */ 23100978Srwatson 24100978Srwatsonpackage com.bar; 25100978Srwatson 26100978Srwatsonimport com.foobar.Utils; 27100978Srwatsonimport java.util.Arrays; 28100978Srwatsonimport static java.util.Calendar.*; 29100978Srwatsonimport java.util.HashMap; 30100978Srwatsonimport java.util.Locale; 31100978Srwatsonimport java.util.Map; 32100978Srwatsonimport java.util.spi.CalendarDataProvider; 33100978Srwatson 34100978Srwatsonpublic class CalendarDataProviderImpl extends CalendarDataProvider { 35100978Srwatson static final char FULLWIDTH_ZERO = '\uff10'; 36100978Srwatson static final Locale[] avail = { 37100978Srwatson new Locale("ja", "JP", "kids"), 38100978Srwatson }; 39100978Srwatson 40145167Srwatson @Override 41100978Srwatson public int getFirstDayOfWeek(Locale locale) { 42163606Srwatson return WEDNESDAY; 43163606Srwatson } 44102123Srwatson 45102123Srwatson @Override 46178184Srwatson public int getMinimalDaysInFirstWeek(Locale locale) { 47178184Srwatson return 7; 48105693Srwatson } 49105693Srwatson 50163606Srwatson @Override 51163606Srwatson public Locale[] getAvailableLocales() { 52105693Srwatson return avail.clone(); 53168933Srwatson } 54171047Srwatson} 55100978Srwatson