Skip to content

Commit

Permalink
Merge pull request #28 from rahilkencor/patch-1
Browse files Browse the repository at this point in the history
[Fix] Timezone issue with format date
  • Loading branch information
ssxv authored Oct 5, 2024
2 parents 1960596 + b9f4db2 commit b8f80d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const formatDate = (date) => { // formats a JS date to 'yyyy-mm-dd'
if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;
return [year, month, day].join('-');
return [year, month, day].join('-').replace(/-/g, '/') ;
}
class App extends Component {
Expand Down Expand Up @@ -226,4 +226,4 @@ class App extends Component {
}
export default App;
```
```

0 comments on commit b8f80d1

Please sign in to comment.