Skip to content

changed convertTime. made two functions ('organizedDate' && 'clockSpl…#372

Open
TalMoshel1 wants to merge 1 commit intomatas70:masterfrom
tal-moshel1:tal-moshel-matas
Open

changed convertTime. made two functions ('organizedDate' && 'clockSpl…#372
TalMoshel1 wants to merge 1 commit intomatas70:masterfrom
tal-moshel1:tal-moshel-matas

Conversation

@TalMoshel1
Copy link

…it'} wich invoked inside convertTime

// console.log(dateString, timeString)
let organizedArray = [];
let dateSplit = dateString.split(".")
let a = prompt('if you write date in month-day-year format - write 0. if you write date in day-month-year format - write 1')
Copy link
Collaborator

@NoamGaash NoamGaash Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

לא רלוונטי להשתמש בprompt, בייחוד לא בפונקציה כזו זניחה
אפשר להניח שהפורמט mm.dd.yyyy לא יהיה בשימוש כי אנחנו לא אמריקנים

var realTime = new Date(year, month - 1, day, hours, minutes);
}

return realTime;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

לא חסר .getTime()?,

return realTime;
}
if (organizedTime.length === 3){
const hours = organizedTime[0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

יש הרבה קוד שחוזר על עצמו
מה שאפשר להוציא מif - כדאי

@TalMoshel1
Copy link
Author

TalMoshel1 commented Apr 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants