Bugfixing
This commit is contained in:
@@ -6,9 +6,11 @@ export const FORMAT_DATE = "DD. MM. YYYY";
|
||||
export const FORMAT_TIME = "HH:mm"
|
||||
|
||||
export const minutesToHumanReadable = (totalMinutes) => {
|
||||
const hours = Math.round(totalMinutes / 60);
|
||||
const hours = Math.floor(totalMinutes / 60);
|
||||
const minutes = totalMinutes % 60;
|
||||
return `${hours}h ${minutes}min`
|
||||
|
||||
const hoursPart = hours > 0 ? `${hours}h ` : "";
|
||||
return `${hoursPart}${minutes}min`
|
||||
}
|
||||
|
||||
export const formatDatetimeNative = (date, format = "DD. MM. YYYY") => {
|
||||
|
||||
Reference in New Issue
Block a user