Weekly usage is showing up incorrect response when a week overlaps two months
See original GitHub issueDescription
Found while testing https://github.com/brave/brave-browser/issues/18254 Weekly usage is showing up incorrect response when a week overlaps two months
Steps to Reproduce
- Set the system date to 29th Nov
- Create a wallet
- Open brave://local-state and confirmed Daily/weekly/monthly metrics response value is 1 as expected
- Close brave
- Set the system date 1st Dec
- Relaunch brave and verify brave://local-state
Brave.Wallet.UsageWeekly
response value is0
instead of1
- weekly usage stats collection starts from Monday, here 29th Nov is Mon and 1st Dec is Wed hence the weekly usage calculation should happen from 29th Nov to 5th Dec. So, I am expecting weekly usage as1
but it’s showing up zero.
Actual result:
Weekly usage is showing up incorrect response when a week overlaps two months
Expected result:
Weekly usage value should be 1
Reproduces how often:
Easy
Brave version (brave://version info)
<html> <body>Brave | 1.33.83 Chromium: 96.0.4664.45 (Official Build) beta (64-bit) |
---|---|
Revision | 76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947} |
OS | Windows 10 Version 21H1 (Build 19043.1348) |
- Can you reproduce this issue with the current release? Yes
- Can you reproduce this issue with the beta channel? Yes
- Can you reproduce this issue with the nightly channel? Yes
Other Additional Information:
- Does the issue resolve itself when disabling Brave Shields? NA
- Does the issue resolve itself when disabling Brave Rewards? NA
- Is the issue reproducible on the latest version of Chrome? NA
Miscellaneous Information:
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Count days in each month for week overlapping two months
Save this question. Show activity on this post. If I had a sequence of weeks, does anyone know of a way to count...
Read more >one week occurs in two months - how to handle this... - 955470
one week occurs in two months - how to handle this? Hi. I am getting strange answers when calculating monthly and weekly values...
Read more >Calculating Gaps Between Overlapping Time Intervals in SQL
Login and logout times will be staggered, and so the intervals when users are logged in will be overlapping. Today we'll ultimately be...
Read more >Handle Weeks that Overlap Years in a SQL Server Date ...
After determining the week number of a particular date, we can use a simple BETWEEN in our WHERE clause to filter the date...
Read more >COMMON ERRORS IN KRONOS AND HOW TO FIX THEM
Correct: Kronos automatically calculated the 2 hours of overtime as CTO (comp time overtime). ... they would be incorrectly reporting 42 hours for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes but DAU and MAU are more important to us so I’d be ok with a low priority on this and it sitting for a while.
@rillian, shouldn’t all 3 values be set to 1 for the above?
Daily should be set to 1 as wallet is accessed on a new day (Dec 1st) Weekly should be set to 1 as wallet is access on the same week where two months overlap Monthly should also be set to 1 as the wallet is accessed on the 1st day of the month.
I tried the following scenario and the values don’t update accordingly
The above scenario only happened for CW and not for Brave Wallet