Skip to content

Игнатенко Алексей#74

Open
Alexxxir wants to merge 10 commits into
urfu-2018:masterfrom
Alexxxir:master
Open

Игнатенко Алексей#74
Alexxxir wants to merge 10 commits into
urfu-2018:masterfrom
Alexxxir:master

Conversation

@Alexxxir
Copy link
Copy Markdown

No description provided.

@honest-hrundel honest-hrundel changed the title test Игнатенко Алексей Oct 30, 2018
@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Пройдено тестов 9 из 16

@honest-hrundel
Copy link
Copy Markdown

🍅 Пройдено тестов 9 из 16

@honest-hrundel
Copy link
Copy Markdown

🍅 Пройдено тестов 9 из 16

@honest-hrundel
Copy link
Copy Markdown

🍅 Пройдено тестов 9 из 16

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Пройдено тестов 11 из 16

@honest-hrundel
Copy link
Copy Markdown

🍏 Пройдено тестов 16 из 16

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍏 Пройдено тестов 16 из 16

Copy link
Copy Markdown

@nex2hex nex2hex left a comment

Choose a reason for hiding this comment

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

🍅

Comment thread robbery.js
const isStar = true;
const isStar = false;

const minutesPerHour = 60;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const MINUTES_PER_HOUR = 60;

Comment thread robbery.js

let dayTimeStrToMinutes = (weekDay, timeStr, timeZone, bankTimeZone) =>
[weekDays.indexOf(weekDay) * minutesPerHour * hourPerDay,
timeStr.split(':')[0] * minutesPerHour + Number(timeStr.split(':')[1]),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

timeStr.split(':') можно в переменную, чтобы 2 раза не сплитить

Comment thread robbery.js
[weekDays.indexOf(weekDay) * minutesPerHour * hourPerDay,
timeStr.split(':')[0] * minutesPerHour + Number(timeStr.split(':')[1]),
(bankTimeZone - (timeZone === undefined ? 0 : Number(timeZone))) * minutesPerHour
].reduce((a, b) => a + b);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

какой тут смысл от reduce, когда можно просто сложить переменные?

Comment thread robbery.js
let addTimeToTwoChars = (time) => time.toString().length === 2 ? time.toString() : `0${time}`;

function minutesToDayTime(minutes, bankTimeZone) {
let weekDay = parseInt(minutes / (minutesPerHour * hourPerDay));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

parseInt(minutes / (minutesPerHour * hourPerDay), 10);

Comment thread robbery.js
let bankTimeZone = Number(workingHours.from.split('+')[1]);
bankTimeZone = isNaN(bankTimeZone) ? 0 : bankTimeZone;
workingHours = getBankSchedule(workingHours, bankTimeZone);
let answer = [NaN].concat(Object.keys(schedule)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

такой код очень сложно читать и понимать
что тут вообще происходит? напиши комментарии, на какой строчке что делается

Например, зачем [NaN] в начале?
Где заканчивается вызов [NaN].concat(... ?

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants