Expo react-native monthly basis local notification scheduling

I’m trying to schedule monthly basis a local notification with expo. As far as I can see from docs, there’s no built in option for monthly basis notification like there is for daily/weekly/yearly.

So the only option we can use is to pass seconds to trigger object.

What needs to be done is to calculate the seconds for monthly occurrences with the method below (It simply calculates the seconds for the amount of days in month):

const daysToSeconds = (days) => {
  return days * 24 * 60 * 60;

This calculates the seconds from the given days for the month and we can pass the seconds to the trigger object for single notification:

trigger: {
    seconds: daysToSeconds(days)
    repeats: true,

What happens behind the scene is that:

If I select February 04 the next occurrence is going to happen on March 04 .

Of course from March 04 to April 04 the seconds interval is not the same as it was from February 04 to March 04 , as there’s a bigger date difference between March 04 and April 04 . So the next occurrence after March 04 will be April 02 .

Specifically for iOS we can use CalendarTriggerInput interface and send monthly basis notifications easily.

How should we handle this case for Android devices? Should we recalculate days between two months each time after single occurrence occurred?

PS. I do understand from Notifications documentation, that monthly basis is not supported at this moment, but…
Could anyone help me find a solution on how to implement this, as I’m close to finish the project and I need to bring it to the client :smiley: