Commit Graph

13 Commits

Author SHA1 Message Date
Antonio Spinelli
4e3c2ba72c Calculate the next date using periodicity strategies.
All these strategies encapsulate how the Carbon library adds the
interval to the current date.

Monthly, Quarterly, Half-Yearly, and Yearly explicitly use the
overflow control to guarantee the end of the next month or year
adequately.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
8e911491f6 Add tests for Navigation
It is responsible for calculating and manipulating Dates in financial
organization is a very important feature, and requires significant
coverage.

The first test case is just to create an understanding of how it
works.
2023-07-03 13:46:29 -03:00
James Cole
895762ff18 Move tests 2020-08-01 05:31:26 +02:00
James Cole
5ae786516a Mark all tests as incomplete. 2020-07-30 20:49:40 +02:00
Hosh Sadiq
14dd185717 Use php-intl to format currencies
Currently the php function `number_format` is used to format currencies.
This is problematic as we have to figure out different things for
different currencies ourselves. These formats are determined based on
the libc's locale functions.

The issue arises where an OS doesn't have the proper locales installed,
or, in some cases, it's not supported (see below on multiple issues).

This addresses this issue by using the php-intl extensions to format the
numbers based on the locale. The extension is already a requirement in
`composer.json`. The solution does not rely on `LC_MONETARY` from the
underlying libc (which in Alpine Linux's case, which uses musl, is not
supported as of yet).

List of issues that are related and would potentially be fixed using
this PR:

- #2298
- #2946
- #3070
- #3306
- #3519
2020-07-19 18:34:39 +01:00
James Cole
f3ac8a5888 Add newlines and remove some unused translations. 2020-05-30 07:33:06 +02:00
James Cole
328c960950 Fix API tests 2020-03-15 15:32:09 +01:00
James Cole
7f46cf805c Update email address. 2020-02-16 13:59:55 +01:00
James Cole
c341d46e9f Update copyright of Firefly III to the GNU Affero General Public License as suggested by @nxxxse in #2607. This applies to all code in this commit from this moment onwards. 2019-10-02 06:45:03 +02:00
James Cole
30f454d38a Fix tests 2019-09-06 17:19:21 +02:00
James Cole
5623c3c43f Clean up some tests 2019-09-04 21:05:50 +02:00
James Cole
19feefda2d Improve test coverage. 2019-08-29 17:53:25 +02:00
James Cole
f4eca2d4ae Test new category code. 2019-08-28 17:01:48 +02:00