You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve noticed a small issue regarding the use of diffInRealMinutes in the welcome message. Currently, the code uses: ->line(Lang::get('This welcome link will expire in :count minutes.', ['count' => $this->validUntil->diffInRealMinutes()]));
The diffInRealMinutes function does not handle formatting user-friendly time differences (e.g., “in 5 minutes”, “in 2 hours”) and might return unexpected negative or non-rounded values.
To improve the user experience, I recommend replacing diffInRealMinutes with diffForHumans, which provides a more readable and accurate representation of the remaining time. For example: ->line(Lang::get('This welcome link will expire :time.', ['time' => $this->validUntil->diffForHumans()]));
The text was updated successfully, but these errors were encountered:
moisesh18
changed the title
diffInRealMinutes does not round correctly in the welcome message
Consider using diffForHumans instead of diffInRealMinutes in the welcome message
Dec 29, 2024
Hello,
I’ve noticed a small issue regarding the use of diffInRealMinutes in the welcome message. Currently, the code uses:
->line(Lang::get('This welcome link will expire in :count minutes.', ['count' => $this->validUntil->diffInRealMinutes()]));
The diffInRealMinutes function does not handle formatting user-friendly time differences (e.g., “in 5 minutes”, “in 2 hours”) and might return unexpected negative or non-rounded values.
To improve the user experience, I recommend replacing diffInRealMinutes with diffForHumans, which provides a more readable and accurate representation of the remaining time. For example:
->line(Lang::get('This welcome link will expire :time.', ['time' => $this->validUntil->diffForHumans()]));
The text was updated successfully, but these errors were encountered: