Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rkhayyat/nativescript-hijri
Nativescript plugin to convert from gregorian to hijri date
https://github.com/rkhayyat/nativescript-hijri
hijri nativescript plugin
Last synced: about 1 month ago
JSON representation
Nativescript plugin to convert from gregorian to hijri date
- Host: GitHub
- URL: https://github.com/rkhayyat/nativescript-hijri
- Owner: rkhayyat
- License: other
- Created: 2017-09-05T22:15:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-10T07:14:04.000Z (about 7 years ago)
- Last Synced: 2024-11-10T19:42:10.318Z (about 2 months ago)
- Topics: hijri, nativescript, plugin
- Language: TypeScript
- Homepage:
- Size: 1.96 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm](https://img.shields.io/npm/v/nativescript-hijri.svg)](https://www.npmjs.com/package/nativescript-hijri)
[![npm](https://img.shields.io/npm/dt/nativescript-hijri.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-hijri)
[![twitter: @rakhayyat](https://img.shields.io/badge/twitter-%40rakhayyat-2F98C1.svg)](https://twitter.com/rakhayyat)[![NPM](https://nodei.co/npm/nativescript-hijri.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/nativescript-hijri/)
# 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
```javascript
tns plugin add nativescript-hijri
```## Usage
## Typescript NativeScript
### main-view-model
```typescript
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 🥖
[](https://github.com/rkhayyat) |
:---: |
[rkhayyat](https://github.com/rkhayyat) |