#89 fix day of week

parent 8bcc12db
...@@ -22,7 +22,7 @@ import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; ...@@ -22,7 +22,7 @@ import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp'; import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
const weekDays = ["Пн","Вт","Ср","Чт","Пт","Сб","Вс" ]; const weekDays = ["Вс","Пн","Вт","Ср","Чт","Пт","Сб" ];
const TableRowTask= ({ const TableRowTask= ({
user, user,
...@@ -40,20 +40,14 @@ const TableRowTask= ({ ...@@ -40,20 +40,14 @@ const TableRowTask= ({
})=>{ })=>{
const [open, setOpen] = React.useState(false); const [open, setOpen] = React.useState(false);
const dateTimeTransform =(dateIso)=>{
const event = new Date(dateIso);
return event.toLocaleString('ru-KZ', { timeZone: 'UTC' })
}
const dateTransform =(dateIso) => {
let date = new Date(dateIso);
return date.getDate()+'-' + (date.getMonth()+1) + '-'+ date.getFullYear().toString().slice(-2);
}
const timeTransform = (dateIso)=>{ const timeTransform = (dateIso)=>{
return moment.utc(dateIso).format("HH:"+"00"); return moment.utc(dateIso).format("HH:"+"00");
} }
const getDayOfWeek = (dateIso) => { const getDayOfWeek = (dateIso) => {
const date = new Date(dateIso); const date = moment.utc(dateIso);
return weekDays[date.getDay()]; return weekDays[date.day()];
} }
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment