Calendar data for new locales

We're developing an aplication on JDK 6. This application needs to support Spanish and Basque. Spanish is not a problem as "es" is a supported locale for the JDK but Basque "eu" is not supported. We've used the new SPI API for defining the Date and Currency Symbols for the eu locale, this works fine.
Our problem arises when we use the GregorianCalendar class for the "eu" locale. When we retrieve the first day of the week the method returns 1 (sunday) but in our locale it should be 2 (monday). It seems that when the locale is not known for the JDK it returns the default value (English, I supose).
Does anyone know how to define the CalendarData for the "eu" locale? or at least, change the default value for getFirstDayOfWeek method?
Thanks in advance,
Juanjo

You may have a look at the java.text.spi and java.util.spi packages.
With these packages you can define your own provider classes, based, for instance, on the ICU4J classes. These classes will be used throughout your JVM, so by third party software as well.
I remember having done this once as an experiment. I don't quite remember how to activate it, but I found my source code. Just as an example here how to make use of the com.ibm.icu.text.DateFormatSymbols
The provider class:
package org.pbjar.icu4j;
import java.text.spi.DateFormatSymbolsProvider;
import java.util.Locale;
import org.pbjar.icu4j.wrap.DateFormatSymbolsWrapper;
import com.ibm.icu.text.DateFormatSymbols;
* Wraps com.ibm.icu.text.DateFormatSymbols.
* @author Piet Blok
public class ICU4JDateFormatSymbolsProvider extends DateFormatSymbolsProvider {
    public ICU4JDateFormatSymbolsProvider() {
    @Override
    public Locale[] getAvailableLocales() {
        return ICU4JLocales.getAvailableLocales();
    @Override
    public java.text.DateFormatSymbols getInstance(Locale locale) {
        return new DateFormatSymbolsWrapper(new DateFormatSymbols(locale));
}And here the wrapper class:
package org.pbjar.icu4j.wrap;
import com.ibm.icu.text.DateFormatSymbols;
* Wrapper for com.ibm.icu.text.DateFormatSymbols.
* @author Piet Blok
public class DateFormatSymbolsWrapper extends java.text.DateFormatSymbols {
    private static final long serialVersionUID = 1L;
    DateFormatSymbols symbols;
    public DateFormatSymbolsWrapper(DateFormatSymbols symbols) {
        this.symbols = symbols;
    @SuppressWarnings("unused")
    private DateFormatSymbolsWrapper() {
    @Override
    public Object clone() {
        return new DateFormatSymbolsWrapper((DateFormatSymbols) symbols.clone());
    @Override
    public boolean equals(Object obj) {
        return (obj instanceof DateFormatSymbolsWrapper ? symbols
                .equals((DateFormatSymbolsWrapper) obj) : false);
    @Override
    public String[] getAmPmStrings() {
        return symbols.getAmPmStrings();
    @Override
    public String[] getEras() {
        return symbols.getEras();
    @Override
    public String getLocalPatternChars() {
        return symbols.getLocalPatternChars();
    @Override
    public String[] getMonths() {
        return symbols.getMonths();
    @Override
    public String[] getShortMonths() {
        return symbols.getShortMonths();
    @Override
    public String[] getShortWeekdays() {
        return symbols.getShortWeekdays();
    @Override
    public String[] getWeekdays() {
        return symbols.getWeekdays();
    @Override
    public String[][] getZoneStrings() {
        return symbols.getZoneStrings();
    @Override
    public int hashCode() {
        return symbols.hashCode();
    @Override
    public void setAmPmStrings(String[] newAmpms) {
        symbols.setAmPmStrings(newAmpms);
    @Override
    public void setEras(String[] newEras) {
        symbols.setEras(newEras);
    @Override
    public void setLocalPatternChars(String newLocalPatternChars) {
        symbols.setLocalPatternChars(newLocalPatternChars);
    @Override
    public void setMonths(String[] newMonths) {
        symbols.setMonths(newMonths);
    @Override
    public void setShortMonths(String[] newShortMonths) {
        symbols.setShortMonths(newShortMonths);
    @Override
    public void setShortWeekdays(String[] newShortWeekdays) {
        symbols.setShortWeekdays(newShortWeekdays);
    @Override
    public void setWeekdays(String[] newWeekdays) {
        symbols.setWeekdays(newWeekdays);
    @Override
    public void setZoneStrings(String[][] newZoneStrings) {
        symbols.setZoneStrings(newZoneStrings);
}Piet

Similar Messages

  • How to set a default start and/or end date for New Events based on trigger date.

    I'm using the CalendarActivityListener to get current row when clicking on an existing event. As per previous posts this listener gives you access to event detail including Start Date, End Date, etc.
    However, what I want to do is to default the start (and end) dates for New Events based on the trigger date.
    I've tried the CalendarListener and can grab the Trigger Date from it - however, I can't see a way to pass this directly to the popup/dialog I'm using to create the new event.
    At present I'm putting the TriggerDate into the ADFContext session scope e.g. ADFContext.getCurrent().getSessionScope().put("TriggerDate",calendarEvent.getTriggerDate());
    Then, I've tried multiple approaches to try and "get" the TriggerDate from session scope to drop it into my new Calendar Event basically, I'm trying to default the InputField(s) associated with the Start Date using the value from the session - I've tried
    1. setting the default value for the InputField in the jspx using a binding expression i.e. value="#{sessionScope.TriggerDate}" - this actually sets the value appropriately when the jspx is rendered but, when I go to create I get a NPE and I can't debug. I assumed that it might be a Date type issue - it would appear that CalendarListener provides a date of type java.util.Date and that the StartDate attribute of my VO/EO/table is a DATE and therefore requires oracle.jbo.domain.Date so I tried casting it - to no effect
    2. Using a Groovy expression *(StartDate==null?adf.context.sessionScope.TriggerDate:StartDate)* in my calendar's EventVO to default the Start Date to the same result
    Any thoughts or ideas?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

  • What about the 50% extra data for new customers?

    I signed up for Verizon HomeFusion 17 days ago.  I copied the following straight off your webpage for new HomeFusion customers:
    "New customers to the service will  receive 50% more data allowance for their first 2 full billing cycles.  Requires new 2-year activation."  Why am I getting data usage alerts and my account is only showing 10 GB allotted for this month. My bill shows that I was allotted 15 GB for only two days (1/24-1/25).  It hasn't been two months yet, barely even two weeks.  Who do I contact to get this fixed? 

        Getting data overage alerts can certainly be concerning flair_2000. Let's get to the bottom of your usage concerns. Customer gets a 50% data bonus on their prorated billing cycle at activation. If you are currently on the 10 GB data plan, with the 50% more data, you will obtain an additional 5GB of data. When is your bill cycle end? Depending on your bill cycle, you will still obtain data usage alerts. For example, the 10 GB of data usage will be prorated depending on when service is activated and your bill cycle ends. The 5GB of extra data will not be prorated.
    To view your usage and prevent any overage, you may review your usage online via My Verizon by clicking http://bit.ly/xB4iTc  Should you have further questions or concerns, please feel free to reach out to us.
    Thank You,
    MichelleL_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • Release date for new updates

    I'm super excited about the new features, especially the integration of C4D and AE, and adding looks in Premiere. I've looked for information about release dates but can't find any details. What's the release date for the new features?

    No official date yet but based on past releases it will likely be in the next month or two.

  • N73 - date for new software version

    Please see below the date for the next update. This came from their Director of Customer Care:
    "With regards to your recent enquiry concerning software availability for your product code 0539101 for UK Country Variant I can confirm that at present you already have the latest software version available. New software version for your product should be available no later than Friday the 8th December in both our Nokia service points and Nokia Software Updater."

    goodie...
    for all those complaining about no Country Variant fw editions, just hang on 2 more weeks and have a merry xmas

  • Raw up date for new nikon d7100 in cs5.1

    raw up date for nikon d7100 for cs5.1 can any one please help me on this matter

    The D7100 is supported only in PS-CS6/ACR 7.4 and newer.  There will be no update for CS5.1.
    You can upgrade your CS to CS6 or CC or download the free DNG Converter to make DNGs from your NEFs and open those in older versions of Camera Raw.  You’ll want to make sure to set the DNGC compatibility options to something lower than the default of ACR 7.1.  The DNG Converter is available, here:
    http://www.adobe.com/downloads/updates

  • Data for new company code

    Hi all we are in process of creating new company code. And wanted to upload data for the same.We are given the reference company code for extracting the master data.
    I dont know how to make use of this reference company code to extract the MATERIAL AND VENDOR  data required.
    WHICH TABLES I SHOULD USE TO EXTRACT THE DATA
    Thanks in Advance
    Monica

    Hi,
    Use  tables,
    1.For material MARA,MARC,MVKE,( try use t.code:MM60)
    2.For vendor LFA1,LFB1 (try use t.code:MKVZ)
    Regards,
    Biju K

  • Sale date for new Ipad 2

    I am in Singapore now and want to know the date for ordering the new Ipad 2 and the hour since there is such a big time difference.

    Hi,
    March 11 at 5pm. I assume they are referring to Pacific time given Apple's headquarters in Cupertino.
    See the online store for more info.
    http://www.apple.com/ipad/how-to-buy/
    Carolyn

  • HT203177 Can time machine backup data for newer OS?

    I had upgraded my Macbook to OS X 10.7
    Can I continue to backup data for Time Machine used to backup data for the same Macbook with previous version of OS?

    Yes. Time Machine will continue to backup your system as it should.

  • Discrepency while REPLICATING META DATA (for new DATA SOURCE) in BI side.

    In R/3 I have created a simple TRANSACTIONAL data store based on an INFO QUERY.
    I even checked the veracity of this data store using RSA3 to see whether it extracts data. Works perfectly.
    I go to BW side. Click on the SAP module under which I have created the data source, right click, select 'REPLICATE' and click on it.
    ( I would love to post the screen shot here, but I think I may not be able to paste BMP files here).
    I will write the contents of the POP-UP that appears,
    Title:Data Source from Source System Unknown
    Pop-up contents:
    Data Source (OSOA) DS_01
    does not exist in BI system
    How do you want to create the object in BI?
    1. as DataSource (RSDS)
    2. as 3.x DataSource (ISFS)
    3. this and following 3 as DataSource (RSDS)
    4. this and following 3 as 3.x DataSource (ISFS).
    Well, I normally select option three as per my instructions (without knowing the real reason).
    But sometimes, either for the same data source or for another data sources that I created, the same pop up will appear like this
    Title:Data Source from Source System Unknown
    Pop-up contents:
    Data Source (OSOA) DS_01
    does not exist in BI system
    How do you want to create the object in BI?
    1. as DataSource (RSDS)
    2. as 3.x DataSource (ISFS)
    Just TWO options.
    And, if I select option 1, the data source does not work properly on BI side, though it worked perfectly on R/3 under TRANSACTION RSA3 and showed me data.
    For some unknown reasons, if I delete the erroneous datasource on BI side and sleep overnight and comeback in the morning and replicate, the POP-UP sometimes appears with FOUR options, (Notice the word 'SOMETIMES')
    Can someone explain the secret behind this?
    Thanks again in advance,
    Gold

    3. this and following 3 as DataSource (RSDS)
    That means there are total 3 new (not yet in BI) DataSources available, u wanted to replicate as 7.0 datasource (RSRS) or 3.x datasource (ISFS).
    (other 2 datasources activated from RSA5, or created by other users under that SAP module)
    If there is 1 new DataSource, u will  get just TWO options.
    1. as DataSource (RSDS)
    2. as 3.x DataSource (ISFS)
    After replication with option 1, u should activate datasource in BI, then create infopackages, transformation, DTP etc.

  • 0HR_PT_2 How to get back historical data for new report time type

    Hi All Expert,
    We have implemented and using the 0HR_PT_2 extractor for the past whole year. The Delta is working. Recently, there is requirement to read more data from the ZL custer table, and more new BW Report Time Types are added to extract such data.
    The delta doesn't pick up the the past whole year data of the new report time type that we added.
    Do we need to re-initialize the load to get back those historical data every time when we add a new report time type?
    Please advice and Thx
    Ken
    Edited by: Ken Hong on Feb 27, 2008 9:24 PM
    Edited by: Ken Hong on Feb 27, 2008 9:25 PM

    P.s, all hidden files are shown in es file explorer as this backup folder was hidden originally. It has a '.' in front. So I'm pretty sure the folder it's gone, but as I've not erased my phone again, shouldn't the folder be somewhere in my SD card still and how can I find it using my Mac?

  • Throttled data for new heavy users??

    HowardForums had a link to a this tidbit from a Verizon site.
    Important Information about Verizon Wireless Data Plans and Features
    As part of our continuing efforts to provide the best experience to our more than 94 million customers, Verizon Wireless is introducing two new network management practices.
    We are implementing optimization and transcoding technologies in our network to transmit data files in a more efficient manner to allow available network capacity to benefit the greatest number of users. These techniques include caching less data, using less capacity, and sizing the video more appropriately for the device. The optimization process is agnostic to the content itself and to the website that provides it. While we invest much effort to avoid changing text, image, and video files in the compression process and while any change to the file is likely to be indiscernible, the optimization process may minimally impact the appearance of the file as displayed on your device. For a further, more detailed explanation of these techniques, please visit www.verizonwireless.com/vzwoptimization
    If you subscribe to a Data Plan or Feature on February 3, 2011 or after, the following applies:
    Verizon Wireless strives to provide customers the best experience when using our network, a shared resource among tens of millions of customers. To help achieve this, if you use an extraordinary amount of data and fall within the top 5% of Verizon Wireless data users we may reduce your data throughput speeds periodically for the remainder of your then current and immediately following billing cycle to ensure high quality network performance for other users at locations and times of peak demand. Our proactive management of the Verizon Wireless network is designed to ensure that the remaining 95% of data customers aren't negatively affected by the inordinate data consumption of just a few users.
    And here is a link to the optimization process

    lewisr13 wrote:
    Comcast does something very similar with their internet. They do it so users don't use the residential service for heavy business usage. Residentialservice is cheaper than business class.
    They also have a meter so you know where you stand. Also, throttling does not continue into the next month. I just feel VZW should had been more up front about this BEFORE the preordering of the iPhone.
    It will not affect me at all.

  • Logon_time in v$session gives old date for new session

    Hi,
    I have a unique issue whenever I run v$session for username='A' and status= active I see logon_time as old date in this its '12-MAY-2008'. Now there are total 150 sessions for username='A'. 2 are status= Active, 1 is status=Killed and 147 are status=INACTIVE.
    So whenever a new session comes from application side it activates the INACTIVE session and date remains 12-May-2008 instead of current date.
    Also when you logon directly to Oracle using user 'A' , again same logon_time in v$session, rather than current date in logon_time. We are using Oracle 9.2.0.6 on Unix.
    Any way I can resolve this issue?
    Regards,
    Tushar Kathe

    Hi,
    select username,logon_time,machine,terminal from v$session where status='ACTIVE';
    USERNAME LOGON_TIM MACHINE TERMINAL
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    04-MAY-08 prod1.test.com UNKNOWN
    SYS 22-MAY-08 prod1.test.com
    pts/4
    TEST 12-MAY-08 app20.test.com
    SYS 22-MAY-08
    16 rows selected.
    You can see the schema test shows logon_time as 12-May-08 but he has infact logon in the system today so should have today's date. The Toad time output I don't have.
    Regards,
    Tushar Kathe

  • Release date for new TREX features (esp. guided nav, thesauri/topic maps

    In a SAP presentation on TREX, the outlook for future improvements listed the following items :
    - combine QBT and EBT
    - Thesauri and XML Topic Maps ***
    - Taxonomy Import
    - Guided Navigation ***
    - Additional languages
    - Additional Formats
    I am especially interested in the items annotated with ***
    Is there any information available when these feature will become available.
    Will they be part of one of the next Netweaver 2004 stack levels or are these features planned only for the next Netweaver release (2005 or later)
    In addition there has been the announcement of TREX Enterprise Search which should allow searching across both structured and unstructured data sources. Any news on that ?
    Thanks in advance for your information
    Message was edited by: Theo Paesen
    Message was edited by: Theo Paesen

    Hi Theo,
    in general, the features you list are TREX features and have hopefully been presented as such. Features of TREX are not necessarily fetaures of KM. Many SAP solutions use TREX in quite a few different ways. Some for document search (such as KM, PLM DMS and more) some for accelerated table data scans (such as BI, CRM and more).
    Thus, you do not find all TREX features being used at the same time in the same solutiuon. And, to anticipate that question, sorry, the direct TREX APIs are still not public.
    <b>Point by point:</b>
    <b>- combine QBT and EBT</b>
    Available in TREX engine
    Planned for KM (no date)
    <b>- Thesauri and XML Topic Maps</b>
    XTM available through TREX Python Extensions
    No plan for KM
    More info under:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to enable semantic search or search for synonyms in trex.pdf
    <b>- Taxonomy Import</b>
    Preliminary workaround available in KM
    Full-featured with KM Transport in SPS15
    <b>- Guided Navigation</b>
    Available in TREX engine
    (very simple example at http://help.sap.com "narrow by info class")
    Different plans in different solutions, KM not before 2006
    <b>- Additional languages</b>
    Happening constantly, coming up:
    Slovakian, Slovenian, Catalan, Croatian
    (That is for TREX engine linguistics. Not necessarily all UIs translated.)
    <b>- Additional Formats</b>
    Happening constantly, coming up:
    HWP2 Hangul 2002 (text only)
    ICH new support for Ichitaro 13 and 2004
    JBG2 new support for JBIG2 files embedded in PDF files
    MIME Mime encoded mail messages
    MPP new support for Project 2003 (text only)
    PDF new support for JBIG2 files,
    PP97 new support for PowerPoint 2004 and v.X for Mac
    QP9 new support for Quattro Pro version 12
    SHW3 new support for Presentations version 12
    SO6 new support for paragraph- and character-level attributes
    VCRD new support for vCalendar
    VISO new support for Visio 2003
    W97 new support for Word 2004 and v.X for Mac
    WP6 new support for Word Perfect version 12
    XL5 new support for Excel 2004 and v.X for Mac
    <b>Enterprise Search...</b>
    ...is not a TREX feature, technically speaking.
    ...is a meta search framework.
    ...will connect to any solution providing a search functionality.
    ...will connect to as well TREX-using is completely non-SAP solutions.
    ...will use e.g. KM, BI and MDM as some of its default sources.
    ...will ship in 2006.
    Hope that clarifies,
    Karsten

  • Calendar/Date set to local time MIDP/CLDC

    I've been playing around with the phone emulator and the Date and Calendar class. I noticed the time is always "UTC".
    My question is, will actual devices ALWAYS (e.g. the standard says) know their time zone? I've read the literature, and it seems to imply "NO", but I'm looking for a definitive answer.

    I also played aroung with Date, Calenadar und Timezone. I found out, that Date operates in GMT. Only Timezone that is requiered for mobiles to be implemented is GMT. Others may be present but do not have to, so as a serious developer, you need to work with GMT.
    I found out that there seems to be a problem with the correct dls time correction in GMT; it simply doesn't work right. I think this is because internally Java is working with UTC which does not work with dst and obvisouly they forgot to build in a correction that for.
    For your specific question i would say "no" too. Keep in mind, that even if J2ME is a standard the implementation on a special device is highly proprietary, so there is almost nothing you can get a definitive answer for... :-(

Maybe you are looking for

  • How do I make new tabs from a first window go behind instead of in front of the first window?

    I use the same version of Firefox at work & new tabs open "behind" the initial tab, I can't figure out how to make this happen on my home computer! At home, new tabs open "in front" of the initial tab & it's really frustrating!

  • Is there a way to format text in Small Caps?

    I have just installed Photoshop Elements 11 for Windows and am wondering if there is a setting to format text in small caps?

  • Re-submit a form

    Hey VC experts, I've got the following scenario that I need your help with: - One "Input Form" accepts "Calendar Day" as input and executes more than 10 queries which in turn feed data to more than 10 forms each displaying either a "Guage" or a "Prog

  • Error msg on WLC

    I am trying to place my LAP on a different subnet as of my WLC, this is the error msg i got Received LWAPP DISCOVERY REQUEST from AP 00:0b:85:64:cc:90 to ff:ff:ff:ff:ff:ff on port '4' Received a Discovery-Request on an unsupported VLAN 18 Did i miss

  • Scanner doesn't show in File Import menu in PSE 6

    Hi I'm on Mac OS X 10.5.8 I recently upgraded from PSE 4 to PSE 6 and everything is fine. It delivers everything I expected but for one little thing. Il was using my Epson scanner with PSE 4. The driver used to be listed in the File>Import menu. Afte