jalaj711 / gastos-backend

Backend for Gastos - A finance tracker with multiple wallet support, custom color coded labels, complex search filters and spend insights.
Other
1 stars 0 forks source link

Incorrect way of determining the week number of current month #1

Closed jalaj711 closed 1 year ago

jalaj711 commented 1 year ago

Currently, the week is determined in a very basic manner:

https://github.com/jalaj711/finance-tracker-backend/blob/2c93a9fe132bf9b7c318edcd96cfaf9402961751/api/views/transaction.py#L30

This only works when first day of the month is a Monday. Other times, this is simply incorrect. We should probably use a library that is able to determine the week number in a more accurate manner.

jalaj711 commented 1 year ago

Fixed in ed07edf86190071a170ff8cea7d8989bd3ce5468.