cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers (JIRA)" <>
Subject [jira] [Commented] (COCOON3-114) The next year and previous year is incorrect of CalendarGenerator in the cocoon-optional module
Date Wed, 28 Nov 2012 12:06:59 GMT


Robby Pelssers commented on COCOON3-114:

Hi ZhiQiang,

I wish you would have specified more clearly what is wrong.  I think you made a wrong assumption
about the cloning. The CalendarGenerator uses default values if they are not specified in
the configuration:
        this.year = cacheKeyParList.getAsInteger("year", now.get(Calendar.YEAR));
        this.month = cacheKeyParList.getAsInteger("month", now.get(Calendar.MONTH) + 1) -

But i ran the test for 2 configurations and it all looks just fine:

        parameters.put("lang", "de");
        parameters.put("country", "DE");
        parameters.put("year", 2011);
        parameters.put("month", 2);

<?xml version="1.0" encoding="UTF-8"?>
<calendar:calendar xmlns:calendar="" year="2011" month="Februar"
prevYear="2011" prevMonth="01" nextYear="2011" nextMonth="03">
  <calendar:week number="1">
    <calendar:day number="1" weekday="Dienstag" date="1. Februar 2011"/>
    <calendar:day number="2" weekday="Mittwoch" date="2. Februar 2011"/>
    <calendar:day number="3" weekday="Donnerstag" date="3. Februar 2011"/>
	<calendar:day number="4" weekday="Freitag" date="4. Februar 2011"/>
	<calendar:day number="5" weekday="Samstag" date="5. Februar 2011"/>
	<calendar:day number="6" weekday="Sonntag" date="6. Februar 2011"/>
  <calendar:week number="2">
    <calendar:day number="7" weekday="Montag" date="7. Februar 2011"/>
	<calendar:day number="8" weekday="Dienstag" date="8. Februar 2011"/>
	<calendar:day number="9" weekday="Mittwoch" date="9. Februar 2011"/>
	<calendar:day number="10" weekday="Donnerstag" date="10. Februar 2011"/>
	<calendar:day number="11" weekday="Freitag" date="11. Februar 2011"/>
	<calendar:day number="12" weekday="Samstag" date="12. Februar 2011"/>
	<calendar:day number="13" weekday="Sonntag" date="13. Februar 2011"/>
  <calendar:week number="3">
    <calendar:day number="14" weekday="Montag" date="14. Februar 2011"/>
	<calendar:day number="15" weekday="Dienstag" date="15. Februar 2011"/>
	<calendar:day number="16" weekday="Mittwoch" date="16. Februar 2011"/>
	<calendar:day number="17" weekday="Donnerstag" date="17. Februar 2011"/>
	<calendar:day number="18" weekday="Freitag" date="18. Februar 2011"/>
	<calendar:day number="19" weekday="Samstag" date="19. Februar 2011"/>
	<calendar:day number="20" weekday="Sonntag" date="20. Februar 2011"/>
  <calendar:week number="4">
    <calendar:day number="21" weekday="Montag" date="21. Februar 2011"/>
	<calendar:day number="22" weekday="Dienstag" date="22. Februar 2011"/>
	<calendar:day number="23" weekday="Mittwoch" date="23. Februar 2011"/>
	<calendar:day number="24" weekday="Donnerstag" date="24. Februar 2011"/>
	<calendar:day number="25" weekday="Freitag" date="25. Februar 2011"/>
	<calendar:day number="26" weekday="Samstag" date="26. Februar 2011"/>
	<calendar:day number="27" weekday="Sonntag" date="27. Februar 2011"/>
  <calendar:week number="5">
    <calendar:day number="28" weekday="Montag" date="28. Februar 2011"/>

        parameters.put("lang", "de");
        parameters.put("country", "DE");
        parameters.put("year", 2012);
        parameters.put("month", 3);

<?xml version="1.0" encoding="UTF-8"?>
<calendar:calendar xmlns:calendar="" year="2012" month="März"
prevYear="2012" prevMonth="02" nextYear="2012" nextMonth="04">
  <calendar:week number="1">
    <calendar:day number="1" weekday="Donnerstag" date="1. März 2012"/>
	<calendar:day number="2" weekday="Freitag" date="2. März 2012"/>
	<calendar:day number="3" weekday="Samstag" date="3. März 2012"/>
	<calendar:day number="4" weekday="Sonntag" date="4. März 2012"/>
  <calendar:week number="2">
	<calendar:day number="5" weekday="Montag" date="5. März 2012"/>
	<calendar:day number="6" weekday="Dienstag" date="6. März 2012"/>
	<calendar:day number="7" weekday="Mittwoch" date="7. März 2012"/>
	<calendar:day number="8" weekday="Donnerstag" date="8. März 2012"/>
	<calendar:day number="9" weekday="Freitag" date="9. März 2012"/>
	<calendar:day number="10" weekday="Samstag" date="10. März 2012"/>
	<calendar:day number="11" weekday="Sonntag" date="11. März 2012"/>
  <calendar:week number="3">
    <calendar:day number="12" weekday="Montag" date="12. März 2012"/>
	<calendar:day number="13" weekday="Dienstag" date="13. März 2012"/>
	<calendar:day number="14" weekday="Mittwoch" date="14. März 2012"/>
	<calendar:day number="15" weekday="Donnerstag" date="15. März 2012"/>
	<calendar:day number="16" weekday="Freitag" date="16. März 2012"/>
	<calendar:day number="17" weekday="Samstag" date="17. März 2012"/>
	<calendar:day number="18" weekday="Sonntag" date="18. März 2012"/>
  <calendar:week number="4">
    <calendar:day number="19" weekday="Montag" date="19. März 2012"/>
	<calendar:day number="20" weekday="Dienstag" date="20. März 2012"/>
	<calendar:day number="21" weekday="Mittwoch" date="21. März 2012"/>
	<calendar:day number="22" weekday="Donnerstag" date="22. März 2012"/>
	<calendar:day number="23" weekday="Freitag" date="23. März 2012"/>
	<calendar:day number="24" weekday="Samstag" date="24. März 2012"/>
	<calendar:day number="25" weekday="Sonntag" date="25. März 2012"/>
  <calendar:week number="5">
    <calendar:day number="26" weekday="Montag" date="26. März 2012"/>
	<calendar:day number="27" weekday="Dienstag" date="27. März 2012"/>
	<calendar:day number="28" weekday="Mittwoch" date="28. März 2012"/>
	<calendar:day number="29" weekday="Donnerstag" date="29. März 2012"/>
	<calendar:day number="30" weekday="Freitag" date="30. März 2012"/>
	<calendar:day number="31" weekday="Samstag" date="31. März 2012"/>

Please test again or add useful comments to the ticket as to what you think is wrong !!! 
Otherwise I will close this ticket as not reproducable.

> The next year and previous year is incorrect of CalendarGenerator in the cocoon-optional
> -----------------------------------------------------------------------------------------------
>                 Key: COCOON3-114
>                 URL:
>             Project: Cocoon 3
>          Issue Type: Bug
>          Components: cocoon-optional
>            Reporter: ZhiQiang,He
>            Priority: Critical
>             Fix For: 3.0.0-beta-1
>         Attachments: cocoon-optional-CalendarGenerator.patch
> The calendar of previous year and next year which cloned from start clendar is same as
this year with no adding and substract, but i down known why the test case is passed. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message