hijriyah_indonesia

Last updated:

0 purchases

hijriyah_indonesia Image
hijriyah_indonesia Images
Add to Cart

Description:

hijriyah indonesia

Hijriyah Indonesia #
Hijriyah Calendar Converter
Usage
//Suppose current gregorian data/time is: Fri September 9 00:27:33 2022
var _today = Hijriyah.now();
print(_today.hYear); // 1444
print(_today.hMonth); // 2
print(_today.hDay); // 14
print(_today.getDayName()); // 14
// Get month length in days
print(_today.lengthOfMonth); // 30 days
print(_today.toFormat("MMMM dd yyyy")); //Shafar 14 1444
copied to clipboard
Change Local
String locale = 'id';
Hijriyah.setLocal(locale);
copied to clipboard
Usage convert
Hijriyah.fromDate(DateTime.parse(dateTime.toString()).toLocal()).toFormat("EEEE, dd MMMM yyyy"); // Jumat, 19 Safar 1446
Hijriyah.fromDate(DateTime.parse(dateTime.toString()).toLocal()).toFormat("EE, dd MMMM yyyy") // Jum, 19 Safar 1446
copied to clipboard
Add New Locale
Hijriyah.addLocale(locale, {
'long': ...,
'short': ...,
'days': ...,
'short_days': ...
});
Hijriyah.setLocal(locale);
copied to clipboard
From Gregorian to Ummalqura
var h_date = Hijriyah.fromDate(DateTime(2018, 11, 12));
print(h_date.toString()); //04/03/1444H
print(h_date.getShortMonthName()); //Rab
print(h_date.getLongMonthName()); //Rabiul Awwal
print(h_date.lengthOfMonth); // 29 days
copied to clipboard
Check if date is valid
//
var _check_date = Hijriyah();
_check_date.hYear = 1439;
_check_date.hMonth = 11;
_check_date.hDay = 30;
print(_check_date.isValid()); // false -> This month is only 29 days
copied to clipboard
From Ummalqura to Gregorian
//From Ummalqura to Gregorian
var g_date = Hijriyah();
print(g_date.hijriToGregorian(1444, 7, 27)); //2022-09-9 00:00:00.000
copied to clipboard
Format
var _format = Hijriyah.now();
print(_format.fullDate()); //Selasa, 14 Shaffar , 1444 h
print(_format.toFormat("mm dd yy")); //09 14 39
copied to clipboard
Compare
//Suppose current hijri data is: TSelasa, 14 Shaffar , 1444 h
print(_today.isAfter(1440, 11, 12)); // false
print(_today.isBefore(1440, 11, 12)); // true
print(_today.isAtSameMomentAs(1440, 11, 12)); // false

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.