Skip to content

Wrong date in EuropeMapDescription for page "/scenario/{scenarioId}/game/{gameId}/info" #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
evorios opened this issue Sep 3, 2015 · 0 comments

Comments

@evorios
Copy link

evorios commented Sep 3, 2015

When you prepare data for page in View, you get first date by current game turn for first turn. Then you add one month and get next date for next game turn. And its wrong.
You need to use game start date for getting first date. As in this example:

final Calendar thisCal = Calendar.getInstance();
thisCal.set(1805, Calendar.JANUARY, 1);
for (final Report thisReport : reportVP) {
    final ChartData cdata = new ChartData();
    cdata.setCaption(nation.getName());
    cdata.setYear(thisCal.get(Calendar.YEAR));
    cdata.setMonth(thisCal.get(Calendar.MONTH));
    cdata.setValue(Integer.parseInt(thisReport.getValue()));

    thisList.add(cdata);
    thisCal.add(Calendar.MONTH, 1);
}

Or, using the prepared data:

refData.put("monthsFull", monthsFull);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant