Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((this.Fajardistance <= '20') && (this.Fajardistance >= '0')) {
- //if case is checking if fajar distance is equal or less than 20 mins than it will continue.
- this.CurrentTimeNotification = moment().unix();
- //checking current time using moment
- this.fajarNotification = moment(value.fajar_iqamah, 'HH:mm: A').diff(moment().startOf(this.CurrentTimeNotification), 'minutes');
- //this is calculation mins perfectly.
- //Now i am using this method for local notification
- this.localNotifications.schedule({
- text: 'Reminder for ' + value.fajar_salat + 'Iqamah',
- //at: this.fajarNotification ,
- every: this.fajarNotification,
- led: 'FF0000',
- sound: null
- });
- this.notifications.push(this.localNotifications);
- }
- "at: this.fajarNotification"
- "every: this.fajarNotification"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement