https://github.com/nbadiganti/coptic-date-mobile
https://github.com/nbadiganti/coptic-date-mobile
angular2 angular4 coptic coptic-studies datetime ionic3 mobile-app
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nbadiganti/coptic-date-mobile
- Owner: nbadiganti
- Created: 2018-12-06T12:51:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T13:34:15.000Z (over 7 years ago)
- Last Synced: 2025-06-15T02:39:58.945Z (about 1 year ago)
- Topics: angular2, angular4, coptic, coptic-studies, datetime, ionic3, mobile-app
- Language: TypeScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IONIC 3 supportable provider to get date according to the Coptic Christianity
IONIC 3.0 with angular + typescript

## Adding to your project
1. Run `ionic generate provider coptic-date` in your ionic project. It will generate provider file under src folder
2. Copy the code from provider which is available in the github (https://github.com/nbadiganti/coptic-date-mobile/blob/master/src/providers/coptic-date/coptic-date.ts)
### Adding provider to your ionic project
1. Run `import { CopticDateProvider } from '../providers/coptic-date/coptic-date';` to your app.module.ts file
2. Add `CopticDateProvider` to your providers array in app.module.ts
## Get coptic date in your component
```bash
constructor(public navCtrl: NavController, public copticProv: CopticDateProvider) {
// Return today's date and time
var currentTime = new Date();
// returns the month (from 0 to 11)
var month = currentTime.getMonth();
// returns the day of the month (from 1 to 31)
var day = currentTime.getDate();
// returns the year (four digits)
var year = currentTime.getFullYear();
console.log(month, day + " " + year);
this.copticDate = this.copticProv.getCopticDateString(year, month, day);
console.log(this.copticDate);
}
```
Reference links to create this provider - https://github.com/dbishai/orthodox-presenter/blob/master/js/lib/CopticCalendar.js
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT)