Add more details to Hero Carousel, Remove mdi-mui icons, Fix Few bugs
This commit is contained in:
34 files changed
+616
-118
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @format
|
||||
* @param {string} date - Date from server
|
||||
* @returns {string} Formated Date
|
||||
*/
|
||||
|
||||
export const formateDate = (date) => {
|
||||
date = new Date(date);
|
||||
date = new Intl.DateTimeFormat().format(date);
|
||||
return date;
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @format
|
||||
* @param {number} ticks - C# ticks of a particular item
|
||||
* @return {number} Converted ticks to Milliseconds
|
||||
*/
|
||||
|
||||
const ticksToMs = (ticks) => {
|
||||
return Math.round(ticks / 10000);
|
||||
};
|
||||
|
||||
export const getRuntime = (ticks) => {
|
||||
let time = ticksToMs(ticks);
|
||||
let formatedTime = "";
|
||||
let timeSec = Math.round(time / 1000);
|
||||
let timeMin = Math.round(timeSec / 60);
|
||||
if (timeMin > 60) {
|
||||
let timeHr = Math.floor(timeMin / 60);
|
||||
timeMin -= timeHr * 60;
|
||||
formatedTime = `${timeHr}hr ${timeMin}min`;
|
||||
} else {
|
||||
formatedTime = `${timeMin}min`;
|
||||
}
|
||||
return formatedTime;
|
||||
};
|
||||
Reference in new issue
Block a user