question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Date format example for daily repeating local notification

See original GitHub issue

I’m trying to set multiple repeating local notifications daily at a specific hour, However I’m not really sure about how I should pass the date.

In order to get a notification each day at 8:30 , I’m calling localNotificationSchedule like this

PushNotification.localNotificationSchedule({
        message: notificationsText[notificationType].text, 
        date: '08:30',
        repeatType: 'day',
      });

But I’m getting: TypeError: details.date.getTime is not a function, (In 'details.date.getTime()', 'details.date.getTime' is undefined)

What would be a good date format for this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15

github_iconTop GitHub Comments

2reactions
Dallas62commented, May 19, 2020

Hi, If the date is in the past, the notification will be triggered instantly. You must check the date in your code to add one day if the current date is in the past.

1reaction
thaopham-pixacommented, Dec 11, 2020

Hello, const array= [ { id: '1', title: 'Flower', content: 'Sunflower', }, { id: '2', title: 'Month', content: 'May', }, { id: '3', title: 'cloth', content: 'Shirt', }, ] I need have with the function like this: I have an array of items, I want to push an item every day at 9 AM and repeat this array. How should I schedule? Please help me! Thank you for any help, Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Making a Local notification that only repeats on a specific day
1 Answer 1 ; "Sunday", 2 ; "Thursday", 6 ; let weekday = ; Weekday notification.alertTitle = ;!) notification.alertAction = ...
Read more >
How To Send Local Notification With A Repeat Interval (Day ...
In this article, we will learn how to send Local Notifications for a particular date and time at a repeated interval (Day/Minute/Hour etc.)....
Read more >
Scheduling and Handling Local Notifications - Apple Developer
Describes how apps can send and receive user notifications locally and remotely.
Read more >
Run flows on a schedule in Power Automate - Microsoft Learn
Once a day, an hour, or a minute. On a date that you specify. After a number days, hours, or minutes that you...
Read more >
Help › What format can I enter repeat intervals in?
There are two types of repeating tasks. Repeat 'Every...' These tasks repeat every time, whether you complete them or not. For example, Bob...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found