Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358312 - Have no clue how DATE should display but majorly different from RBD
Summary: Have no clue how DATE should display but majorly different from RBD
Status: CLOSED DUPLICATE of bug 355782
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 18:01 EDT by broy2 CLA
Modified: 2017-02-23 14:15 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-09-20 18:01:24 EDT
In RBD, the following is displayed when the program is run:

2/1/99
2/1/99

program fromGregorian type BasicProgram {}	
	myDate DATE;
	myString string;
	i int = 19990201;
	function main()
		myDate = dateTimeLib.dateValueFromGregorian(i);
		myString = myDate;
		SysLib.writeStdout(myDate);
		SysLib.writeStdout(myString);		
	end	
end

In EDT, I get the following when the same code is run:

1999-02-01 00:00:00.000000
1999-02-01 00:00:00.000000

program fromGregorian type BasicProgram {}	
	myDate DATE;
	myString string = "04231981";
	i int = 19990201;
	function main()
		myDate = dateTimeLib.dateFromGregorian(i);
		myString = myDate;
		SysLib.writeStdout(myDate);
		SysLib.writeStdout(myString);		
	end	
end
Comment 1 Matt Heitz CLA 2011-09-20 20:44:57 EDT
Here's the comment on the function that converts dates to strings.

/**
 * {@Operation widen} Converts a date to a string in the format "MM/dd/yyyy".
 * Leading zeros are included in the string, so April 1st in the year 9 A.D. is
 * converted to "04/01/0009".
 */

You're right, we're doing it completely wrong.  This is the problem for which I originally opened bug 355782.

*** This bug has been marked as a duplicate of bug 355782 ***
Comment 2 broy2 CLA 2011-09-21 10:39:58 EDT
Changed status to remind me to verify when 355782 is fixed.
Comment 3 Matt Heitz CLA 2011-09-21 11:19:23 EDT
Brenda, this got into the Closed state because that's what happens by default when I click Mark As Duplicate.  From now on I'll try to remember to make it Resolved instead.  I'm switching this from Reopened to Resolved so we don't have two active defects for the same problem.  Hopefully having this in Resolved not Closed is good enough to remind you that it needs to be verified.

*** This bug has been marked as a duplicate of bug 355782 ***
Comment 4 broy2 CLA 2011-11-02 09:58:56 EDT
OK