[ 
http://jira.dspace.org/jira/browse/DS-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11336#action_11336
 ] 

Kim Shepherd edited comment on DS-497 at 4/18/10 9:50 PM:
----------------------------------------------------------

Yep, good thinking.. something like this seems to work well:

    public int getMonth()
    {
        return (getLocalCalendar() == null || granularity == DateGran.YEAR) ? 
-1 : localCalendar.get(Calendar.MONTH) + 1;
    }

(and getDay() could test for MONTH granularity too)




[edit: had a typo in my logic, it should be || not &&)

      was (Author: kshepherd):
    Yep, good thinking.. something like this seems to work well:

    public int getMonth()
    {
        return (getLocalCalendar() == null && granularity == DateGran.YEAR) ? 
-1 : localCalendar.get(Calendar.MONTH) + 1;
    }

(and getDay() could test for MONTH granularity too)
  
> Date month and day get default values when user returns to describe form
> ------------------------------------------------------------------------
>
>                 Key: DS-497
>                 URL: http://jira.dspace.org/jira/browse/DS-497
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: JSPUI, XMLUI
>    Affects Versions: 1.6.0
>            Reporter: Gabriela Mircea
>            Assignee: Robin Taylor
>             Fix For: 1.6.1, 1.7
>
>
> When a user returns to the first describe form for a previously published 
> item that has only the publication year filled out,  the date month and day 
> get default values of January 1st. The same thing happens when the item has 
> to go through the workflow and the metadata editor visits the first describe 
> page.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to