Ticket #1621 (new defect)

SVN Diffs for #1621

 

Opened 7 years ago

Problem with HebrewCalendar.add (MONTH)

Reported by: armand.bendanan(at)free.fr Assigned to: srl
Priority: minor Milestone: UNSCH
Component: time_calc Version:
Keywords: time_calc Cc:
Load: Xref: p1624
Java Version: Operating System: linux
Project (C/J): ICU4J Weeks: 0.5
Review:

Description

I don't know the version, in the readme.html, it is writen : September 21, 2000.

The add method of HebrewCalendar does not correctly compute the new date for the following date:

import java.util.Locale; import com.ibm.util.HebrewCalendar; import com.ibm.text.DateFormat;

public class TestHebrewCalendar {

public static void main(String args[]) {

HebrewCalendar hc = new HebrewCalendar (5742, HebrewCalendar.AV, 22); DateFormat df = hc.getDateTimeFormat(DateFormat.FULL, DateFormat.FULL,

Locale.getDefault());

String dateString = df.format(hc.getTime()); System.out.println ("hc:" + dateString);

hc.add (HebrewCalendar.MONTH, 1); dateString = df.format(hc.getTime()); System.out.println (" NOW THE hc IS : 22 Tisseri 5743, INSTEED OF 22 ELLOUL

5742");

System.out.println ("hc:" + dateString);

hc.add (HebrewCalendar.MONTH, -1); dateString = df.format(hc.getTime()); System.out.println (" NOW THE hc IS ALWAYS : 22 Tisseri 5743, INSTEED OF 22

ELLOUL 5742");

System.out.println ("hc:" + dateString);

}

}

Attachments

Change History

12/31/69 18:24:29 changed by notes2

Confirmed the problem was already resolved in ICU4J. Need test code and check ICU4C too.

12/31/69 18:24:30 changed by notes

* ICU4J 2000sep

12/31/69 18:24:31 changed by auditor

  • 07/30/02 17:20:55 schererm changed notes
  • 07/30/02 17:20:56 schererm moved from incoming to formatting
  • 07/31/02 18:30:33 schererm changed notes
  • 09/05/02 18:04:32 mohan changed notes2
  • 09/05/02 18:04:32 mohan changed notes
  • 05/25/03 04:11:27 srl changed notes2
  • 05/25/03 04:11:27 srl changed notes
  • 06/24/03 20:22:43 grhoten changed notes2
  • 02/05/04 18:30:29 srl changed notes2
  • 07/13/04 17:56:14 srl changed notes2
  • Tue Sep 27 14:12:18 2005 weiv changed notes2: (via expression '$PglTl3.5') target: "3.0" to "",
  • Wed Sep 27 18:44:40 2006 grhoten moved from formatting to time_calc
  • Tue Oct 17 17:19:44 2006 yoshito changed notes2: comments: "" to "Confirmed the problem was already resolved in ICU4J. Need test code and check ICU4C too.",

Add/Change #1621 (Problem with HebrewCalendar.add (MONTH))




Anti spam check: