1

Since Japersoft ireport designer 5.6.0 doesn't support displaying a current date in arabic (as far as i know), i thought why not create a current arabic date in my application and pass it in my url to jasper ireport designer to display it in the report design in a parameter. But my solution didn't work, maybe i did something wrong, or there is an alternative solution.

Any help on this please?

var months = ["يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو",
          "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"];

var days =["اﻷحد","اﻷثنين","الثلاثاء","اﻷربعاء","الخميس","الجمعة","السبت"];

var date = new Date();

var monthAR = months[date.getMonth()];
var dayAR = days[date.getDay()];
var yearAR = date.getFullYear();
var numberAR = date.getDate();
var arabicdate = dayAR+" "+numberAR+" "+monthAR+" "+yearAR; 
var arDate = arabicdate;
Alex K
  • 22,315
  • 19
  • 108
  • 236
mikeb
  • 709
  • 2
  • 9
  • 35
  • `Japersoft ireport designer 5.6.0 doesn't support displaying a current date in arabic` - What do you mean? You can look at [Java date time in arabic](http://stackoverflow.com/q/19923498/876298) post – Alex K Mar 02 '16 at 12:18
  • @AlexK I'm talking about the current date in tools palette – mikeb Mar 02 '16 at 12:34
  • You can apply the *DateTimeFormatter* for it. Sample: [mysql datetime format change using java for JasperReports generation](http://stackoverflow.com/q/9494093/876298) – Alex K Mar 02 '16 at 12:37
  • set local and apply pattern or pass the data through the parameter map – Petter Friberg Mar 02 '16 at 22:04

0 Answers0