1837004 Members
1998 Online
110111 Solutions
New Discussion

Java language problem.

 
Juan Manuel López
Valued Contributor

Java language problem.

I have a aplication that uses java to get the weekday, from a java funtion.
I have /etc/TIMEZONE file good configurated:

TZ=MET-1METDST
export TZ

The problem is that the weekday format is in USA format, ( week starts on Saturday ), and I need to get the exit on spanish format ( week starts on Monday ).

Maybe, I need some patch or some java library.

My Java is RTE 3.1
My O.S. is HPUX 11.00

Can anybody give me some idea ?

Thanks in advance.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
2 REPLIES 2
harry d brown jr
Honored Contributor

Re: Java language problem.

Actually in the US the start day is Sunday, but that doesn't matter. Have you looked at firstDayOfWeek ??

getFirstDayOfWeek
public int getFirstDayOfWeek()Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
Returns:
the first day of the week.


http://oss.software.ibm.com/icu4j/icu4jhtml/com/ibm/util/Calendar.html#getFirstDayOfWeek()


live free or die
harry
Live Free or Die
Juan Manuel López
Valued Contributor

Re: Java language problem.

I do not know how the aplication people get the first day of the week. So I supose that use this funtion.
Sorry, it is true that the first day of the week on US is Sunday, sorry.
Could you please explain a little more about this ?.

Thanks.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.