nativescript-hijri
Simple plugin for NativeScript to convert from gregorian to hijri date
npm i --save nativescript-hijri

npm npm twitter: @rakhayyat

NPM

Nativescript Hijri plugin

This plugin is inspired by https://github.com/arabiaweather/hijri-date

Nativescript-hijri

Hijri plugin allow you to convert gregorian date to islamic hijri date.

Installation

tns plugin add nativescript-hijri

Usage

Typescript NativeScript

main-view-model

import {Observable} from 'data/observable';
import {Hijri, islamicDateObject} from 'nativescript-hijri';


export class HelloWorldModel extends Observable {
public message: string;
private hijri: Hijri;

constructor() {
super();

this.hijri = new Hijri(new Date,0);
this.message = this.hijri.hijri_en.dayOfWeekText;
console.dir(this.hijri.hijri_en);

}
}

API

Methods

Method Return Description
hijri_ar Object:islamicDateObject Accepts 2 Arguments Date , Date Adjustment by days.
return Object of islamicDateObject where day and month are written in arabic alphabet.
hijri_en Object:islamicDateObject Accepts 2 Arguments Date , Date Adjustment by days.
return Object of islamicDateObject where day and month are written in English alphabet.

NativeBaguette 🥖

Rachid Al Kayat
rkhayyat