refactor fx

This commit is contained in:
madarsbiss 2021-09-22 19:33:24 +03:00
parent 686701a6b9
commit 2121673532
2 changed files with 2 additions and 6 deletions

View File

@ -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";

View File

@ -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) =>