cancel
Showing results for 
Search instead for 
Did you mean: 

Implement Hijri (Islamic) Calender in adobe forms

alkmehta
Explorer
0 Kudos

Hi,

I am looking for a way to implement Hijri (Islamic) Calendar in adobe forms. Could anyone please let me know if I need to use any specific ISR object for this or any other solution is provided?

Many thanks in advance.

Regards,

Alok Mehta

Accepted Solutions (0)

Answers (2)

Answers (2)

ali_eshaghibeni
Participant
0 Kudos

HI Alok

Im not pretty sure you found an answer for your question or not. But for further question this is a solution:

You can use java script in order to calculate hijri date:

1. find and script you want like this on (of course this one is hijri but not for arab countries, this is just a sample)


months = new Array("01","02","03","04","05","06","07","08","09","10","11","12");

a = new Date();

d= a.getDay();

day= a.getDate();

month = a.getMonth()+1;

year= a.getYear();

year = (year== 0)?2000:year;

(year<1000)? (year += 1900):true;

year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;

switch (month) {

case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;

case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;

case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;

case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;

case 5:

case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;

case 7:

case 8:

case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;

case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;

case 11:

case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;

default: break;

}

2. Then choose the object in your form that you want to show the date within, like a textbox

  1. Then from Menu Choose Pallet --> Script Editor.
  2. for form event choose the event you want like Initiate.
  3. Choose Javascript for language.
  4. Write your java code and at end you have to send the result of your code to the textbox as a Value.
  5. here this is a code to transfer data to your textbox value.


this.rawValue = (year+"/"+months[month-1]+"/"+day);

hope this guide help all SAP people.

Florian
Active Contributor
0 Kudos

Hi Alok,

I think you can follow this blog. There is also an example avaible. Hope that help you out.

But i'm not pretty sure, if you can use it exact that way in AIF.

Formatting with alternate calendars in Flex Adobe Globalization

I know, sometimes there are things outside the SCN

Regards

Florian

alkmehta
Explorer
0 Kudos

Hi Florian,

II am looking for specific solution which is for Adobe Online Forms which could be SAP and not able to figure out how would I able to use Flex SDK for this?

I am working for ISR forms and since the web dynpro is also standard I could not see any options to incorporate Flex into it.

Please, guide me in case you have more details or practically achieved incorporating Flex into SAP ISR Forms.

Thanks,

Alok

Florian
Active Contributor
0 Kudos

Hi Alok,

never had a similar thing to do, just thought might be a solution for you. But in wbdynpro is also implemented since release 7.4 i read before. I'm not sure, if i find the time before christmas, but I promise to take a look at the problem again.

I mean, the last solution would be to create a own javascript-class to implement a islmaic calendar.

Just found some articles about it by searching the web with the keywords: Javascript, islamic, calendar;

Regards

Florian

alkmehta
Explorer
0 Kudos

Thanks Florian

I am trying few things in the meantime.

Florian
Active Contributor
0 Kudos

Hi Alok,

I just found a Website with a Javascript-Class.

That is the article, someone shared

Javascript Formula to Calculate Islamic Hijri Dates - Alhabib Islamic Web Service

That is the Source

http://www.al-habib.info/islamic-calendar/hijricalendar-kuwaiti.js


Perhaps that helps you for the moment.

There are a lot of comments below, seems that the code is nearly good to use.

Regards

Florian