new fixes

This commit is contained in:
2023-03-01 00:28:58 +03:00
parent b568ec699e
commit 28a0c7f843
13 changed files with 141 additions and 63 deletions

View File

@ -11,6 +11,21 @@
&__header {
display: flex;
justify-content: space-between;
&-info {
display: flex;
.calendar__hours {
margin: 0 10px;
line-height: 0;
font-weight: 500;
}
}
&-switcher {
display: flex;
}
h3 {
@ -20,6 +35,7 @@
letter-spacing: normal;
line-height: 30px;
text-align: left;
margin-bottom: 0;
@media (max-width: 500px) {
font-size: 1.7em;

View File

@ -60,3 +60,9 @@ export function getCorrectDate(day) {
export function currentMonthAndDayReportPage() {
return moment().format('D MMMM');
}
export function hourOfNum(number) {
const hours = [' час', ' часа', ' часов'];
const cases = [2, 0, 1, 1, 1, 2];
return hours[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]];
}