Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117726954
D2365.1774893167.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
947 B
Referenced Files
None
Subscribers
None
D2365.1774893167.diff
View Options
diff --git a/src/app/Http/Controllers/API/V4/WalletsController.php b/src/app/Http/Controllers/API/V4/WalletsController.php
--- a/src/app/Http/Controllers/API/V4/WalletsController.php
+++ b/src/app/Http/Controllers/API/V4/WalletsController.php
@@ -316,9 +316,14 @@
return \trans('app.wallet-notice-today');
}
+ // Once in a while we got e.g. "3 weeks" instead of expected "4 weeks".
+ // It's because $until uses full seconds, but $now is more precise.
+ // We make sure both have the same time set.
+ $now = Carbon::now()->setTimeFrom($until);
+
$params = [
'date' => $until->toDateString(),
- 'days' => Carbon::now()->diffForHumans($until, Carbon::DIFF_ABSOLUTE),
+ 'days' => $now->diffForHumans($until, Carbon::DIFF_ABSOLUTE),
];
return \trans('app.wallet-notice-date', $params);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 5:52 PM (2 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18818151
Default Alt Text
D2365.1774893167.diff (947 B)
Attached To
Mode
D2365: Fix invalid period in a wallet notice text
Attached
Detach File
Event Timeline