refactor: export isPM to utils.js
This commit is contained in:
8
pages/services/utils.js
Normal file
8
pages/services/utils.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export const isPM = (time) => {
|
||||
let hours = time.split(":")[0];
|
||||
if (hours >= 12) {
|
||||
return "PM";
|
||||
} else {
|
||||
return "AM";
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user