Hi,
I am not the author of the related codes but I am interesting in reading 
source codes.

According to my understanding, the reason behind the -1 design was 
defined in org.dspace.content.DCDate, where -1 means undefined value for 
year, month, day, hours, minutes and seconds.
DCDate is based on Calendar class of java. 0 is not a good choice to 
represent undefined value because 0 is a valid value in 
java.util.Calendar for y,M,d,h,m,s. (e.g. 0 means January when it is a 
month value).

In dspace usage, when there is only year value with no month and day, 
submitters can just put in the year value (e.g. 1930) then sorting will 
be done correctly.

Cheers,
Allen.
HKU Hub Administrator, http://hub.hku.hk


Jochen Lienhard wrote:
> Hi,
>
> I have some metadata-sets, which only contains a year (no month and day).
> For sorting I put the date in like this 1930-00-00.
>
> In the short view I get now a funny date: 0-Uns-1930
>
> I dont know the month 'Uns' ;-)
>
> So my question.
>
> Why did you programm month and date > -1 and not > 0 in UIUtil.java?
>
> Greetings
>
> Jochen
>
>   

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to