Topic
  • 6 replies
  • Latest Post - ‏2014-06-24T13:38:30Z by HermannSW
Asf_DP
Asf_DP
218 Posts

Pinned topic Date Conversion from Gregorain to Hijri

‏2014-06-04T19:57:54Z | gregorain hijri to

Hi,

Can you please let me know how to convert date from Gregorian to Hijri using dp and xslt functions?

 

Thank you

Asif

 

Updated on 2014-06-04T19:58:18Z at 2014-06-04T19:58:18Z by Asf_DP
  • HermannSW
    HermannSW
    7448 Posts
    ACCEPTED ANSWER

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-12T12:27:41Z  
    • Asf_DP
    • ‏2014-06-05T19:05:10Z

    Hi Hermann,

    Thank you.

    The calculator is working correctly. Need to translate XSLT. 
     
    It's good if DataPower can  provide stylesheet function for all dates conversion. 

     

    Asif

     

    The calculator is working correctly. Need to translate XSLT. 
    >
    Here you get XSLT as well as GatewayScript solution (for 7.0.0.0 firmware available later this month):

    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/gregorian_to_islamic_date_conversion


    Hermann <myBlog/> <myTweets/> | <GraphvizFiddle/> | <xqib/> | <myCE/> <myFrameless/>

  • HermannSW
    HermannSW
    7448 Posts

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-05T09:42:38Z  

    Hi,

    there seem to exist different algorithms:
    http://en.wikipedia.org/wiki/Hijri

    Is this online calculator doing what you want? (referenced above)
    http://www.fourmilab.ch/documents/calendar/

    Section "// Update Islamic Calendar" in "function updateFromGregorian()" does the conversion.

    Would need to be converted to XSLT.


    Hermann.

  • Asf_DP
    Asf_DP
    218 Posts

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-05T19:05:10Z  
    • HermannSW
    • ‏2014-06-05T09:42:38Z

    Hi,

    there seem to exist different algorithms:
    http://en.wikipedia.org/wiki/Hijri

    Is this online calculator doing what you want? (referenced above)
    http://www.fourmilab.ch/documents/calendar/

    Section "// Update Islamic Calendar" in "function updateFromGregorian()" does the conversion.

    Would need to be converted to XSLT.


    Hermann.

    Hi Hermann,

    Thank you.

    The calculator is working correctly. Need to translate XSLT. 
     
    It's good if DataPower can  provide stylesheet function for all dates conversion. 

     

    Asif

     

  • HermannSW
    HermannSW
    7448 Posts

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-12T12:27:41Z  
    • Asf_DP
    • ‏2014-06-05T19:05:10Z

    Hi Hermann,

    Thank you.

    The calculator is working correctly. Need to translate XSLT. 
     
    It's good if DataPower can  provide stylesheet function for all dates conversion. 

     

    Asif

     

    The calculator is working correctly. Need to translate XSLT. 
    >
    Here you get XSLT as well as GatewayScript solution (for 7.0.0.0 firmware available later this month):

    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/gregorian_to_islamic_date_conversion


    Hermann <myBlog/> <myTweets/> | <GraphvizFiddle/> | <xqib/> | <myCE/> <myFrameless/>

  • Asf_DP
    Asf_DP
    218 Posts

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-12T15:20:55Z  
    • HermannSW
    • ‏2014-06-12T12:27:41Z

    The calculator is working correctly. Need to translate XSLT. 
    >
    Here you get XSLT as well as GatewayScript solution (for 7.0.0.0 firmware available later this month):

    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/gregorian_to_islamic_date_conversion


    Hermann <myBlog/> <myTweets/> | <GraphvizFiddle/> | <xqib/> | <myCE/> <myFrameless/>

    Hi Hermann,

    Thank you. 

    It is great help.

     

    Asif

     

     

     

  • dp_techdev
    dp_techdev
    51 Posts

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-24T12:04:55Z  
    • HermannSW
    • ‏2014-06-12T12:27:41Z

    The calculator is working correctly. Need to translate XSLT. 
    >
    Here you get XSLT as well as GatewayScript solution (for 7.0.0.0 firmware available later this month):

    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/gregorian_to_islamic_date_conversion


    Hermann <myBlog/> <myTweets/> | <GraphvizFiddle/> | <xqib/> | <myCE/> <myFrameless/>

    Heraman,

    Does it work vice versa also? I mean Hijri to Gregorain..

    Thanks

     

     

  • HermannSW
    HermannSW
    7448 Posts

    Re: Date Conversion from Gregorain to Hijri

    ‏2014-06-24T13:38:30Z  

    Heraman,

    Does it work vice versa also? I mean Hijri to Gregorain..

    Thanks

     

     

    Hi,

    if you look at the stylesheet you will see that it is only from Gregrian to Hijri.

    The question you will have to answer first is in which format a Hijri date will be provided.


    Hermann.