Skip to content

Commit

Permalink
fix: apply pr suggestion fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matinzd committed Dec 20, 2023
1 parent 6630c8f commit ef62e05
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,11 @@ import {
} from 'react-native-health-connect';

const getLastWeekDate = (): Date => {
const today = new Date();
const lastWeek = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() - 7
);
return lastWeek;
return new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000);
};

const getTodayDate = (): Date => {
const today = new Date();
return today;
return new Date();
};

export default function App() {
Expand Down

0 comments on commit ef62e05

Please sign in to comment.