I am building a money manager app with React Native for the purpose of the exam and I have a problem with storing dates. App should be able to list daily, monthly and weekly transactions.
Can someone help me with the schema of a transaction, especially how to handle dates? My transaction has the following attributes:
- amount
- type (income or expense)
- account (credit card or cash)
- category
- date
I am getting the date with new Date()
but its value changes every millisecond and I need my transactions of the same day to to have the same date.
Also if you have a better idea how to design my transaction object, please don't hesitate to tell me.