refactor fx
This commit is contained in:
parent
686701a6b9
commit
2121673532
@ -1,5 +1,5 @@
|
|||||||
import { convertTime, timeToAMPM } from "../services/converters";
|
import { convertTime, timeToAMPM } from "../services/converters";
|
||||||
import { getWeekDay, isPM } from "../services/utils";
|
import { getWeekDay, getTime, isPM } from "../services/utils";
|
||||||
|
|
||||||
import styles from "./DateAndTime.module.css";
|
import styles from "./DateAndTime.module.css";
|
||||||
|
|
||||||
|
@ -19,11 +19,7 @@ export const getWeekDay = (weatherData) => {
|
|||||||
|
|
||||||
export const isPM = (time) => {
|
export const isPM = (time) => {
|
||||||
let hours = time.split(":")[0];
|
let hours = time.split(":")[0];
|
||||||
if (hours >= 12) {
|
return hours >= 12 ? "PM" : "AM";
|
||||||
return "PM";
|
|
||||||
} else {
|
|
||||||
return "AM";
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getWindSpeed = (systemUsed, windInMph) =>
|
export const getWindSpeed = (systemUsed, windInMph) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user