Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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