-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NNS1-3486: new util function to convert from period to dateRange (#6028)
# Motivation We want to convert the selected radio value into a `DateRange` object that can be used when fetching the translations. # Changes - New utility `convertPeriodToNanosecondRange` to convert a reporting period into a transaction date range. # Tests - Unit tests # Todos - [ ] Add entry to changelog (if necessary). Not necessary
- Loading branch information
Showing
4 changed files
with
73 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
export type ReportingDateRange = "all" | "last-year" | "year-to-date"; | ||
|
||
export type TransactionsDateRange = { | ||
/** Start of the date range (inclusive) - timestamp in nanoseconds */ | ||
from?: bigint; | ||
/** End of the date range (exclusive) - timestamp in nanoseconds */ | ||
to?: bigint; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters