Hey. I’m trying to add additional features to this app and would like to make it so the app has the ability to sort if the transaction happened within the last day, week, month, year or over year. In some instances like if the transaction happened in the last 7 days, it may have also happened in the last day. So in theory day +1 and week +1.
How do I implement this in my loop? Can anyone spot the errors in my code? The results just keep getting posted to “overYearTx” instead of being split out into their appropriate categories.
Want it to be able to say like User X had 2 transactions total; 2 (both) this month, 1 was this week. Basically two transactions happened this month, one of which was this week. Hopefully that’s clear.
Would love some help?
Github link: https://github.com/ericlam1114/DataMoralisPlatform/blob/main/stats.js