Skip to content

Commit

Permalink
added time and date correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
atiehamidi committed Sep 4, 2020
1 parent 745d36c commit 5d6723a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/pages/DetailsOfPet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,22 @@ export default function DetailsOfPet() {
<tbody>
{Pet.orders.map((order) => {
// setIsdone(order.done ? "✅" : "❌");
var str = order.start;
var start = str.split("T");
var timeOfStart = start[1].split(".");
var strEnd = order.end;
var End = strEnd.split("T");
var timeOfEnd = End[1].split(".");
return (
<tr key={order.id}>
<td>{order.id}</td>
<td>{order.total}</td>
<td>{order.start}</td>
<td>{order.end}</td>
<td>
{start[0]}/{timeOfStart[0]}
</td>
<td>
{End[0]}/{timeOfEnd[0]}
</td>
<td>{order.descriptionOfOrder}</td>
<td>{order.done ? "✅" : "❌"}</td>
</tr>
Expand Down

0 comments on commit 5d6723a

Please sign in to comment.