Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. if ((this.Fajardistance <= '20') && (this.Fajardistance >= '0')) {
  2. //if case is checking if fajar distance is equal or less than 20 mins than it will continue.
  3.  
  4. this.CurrentTimeNotification = moment().unix();
  5. //checking current time using moment
  6.  
  7. this.fajarNotification = moment(value.fajar_iqamah, 'HH:mm: A').diff(moment().startOf(this.CurrentTimeNotification), 'minutes');
  8. //this is calculation mins perfectly.
  9.  
  10. //Now i am using this method for local notification
  11. this.localNotifications.schedule({
  12. text: 'Reminder for ' + value.fajar_salat + 'Iqamah',
  13. //at: this.fajarNotification ,
  14. every: this.fajarNotification,
  15. led: 'FF0000',
  16. sound: null
  17. });
  18.  
  19. this.notifications.push(this.localNotifications);
  20. }
  21.  
  22. "at: this.fajarNotification"
  23.  
  24. "every: this.fajarNotification"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement