How to get Hijri Date in Outsystems Mobile Application

Goodday everyone,


I am working on a Mobile Application and for one of my UI, i need to show a list of dates / years for Hijri dates.


Can anyone let me know, how we can do it in outsystems?

Hello Bilal.

This is only the second time a question about hijiri dates shows up in the forum. I think someone from islamic countries can help you better, but here goes what I could check:

Although the calendar also has 12 months, because date type in OS considers February as a 28 days month, you cant use the same structure to store hijiri dates. 

.NET supports hijiri dates as a date format so I guess you can do an extension in C# to convert it. Remember that unless you use a tabular Islamic calendar the conversion isn't always accurate.

var calendar = new HijriCalendar();
var gregorian = DateTime.Now; // The DateTime value
var hijriYear = calendar.GetYear(gregorian);
var hijriMonth = calendar.GetMonth(gregorian);
var hijriDay = calendar.GetDayOfMonth(gregorian);

So you can manually do three day-month-year pickers and in the background check if it is a valid date.

Thanks Nuno,


I was already thinking about creating an extension method as i also searched same and only one thread was there and it was not fulfilling the requirement.


I will have to show a list of years from current year to forward / backward so i hope that extension method will be a solution as of now, until, outsystems provide some solution in future releases.

Bilal Iqbal wrote:

Thanks Nuno,


I was already thinking about creating an extension method as i also searched same and only one thread was there and it was not fulfilling the requirement.


I will have to show a list of years from current year to forward / backward so i hope that extension method will be a solution as of now, until, outsystems provide some solution in future releases.

Hi Bilal,

If you think that new extension which you create will solve your problem and can also helps other in future then you can upload your extensions to forge. In the future if anyone have same requirement then they use your component. We really appreciate if you upload extension in forge for others.


Thanks,

Rajat Agrawal