Skip to content

Commit

Permalink
Merge pull request #101 from AII-the-time/dev
Browse files Browse the repository at this point in the history
feat: set seed order time under 10:00
  • Loading branch information
raipen authored Nov 24, 2023
2 parents 164287a + 7bc08fc commit 0ff8979
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions seeding/testSeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const menuData = menuRawData.split('\n').slice(3).join('\n').split('\n,,,,,,,\n'
const categoryData = [...new Set(menuData.map((menu) => menu.category))];

const getDateBeforeToday = (days: number, time: number,minites: number):Date => {
if(days === 0){
time = Math.floor(Math.random() * 2);
}
const date = new Date(new Date().getTime() - days * 24 * 60 * 60 * 1000);
return new Date(`${date.toISOString().split('T')[0]}T0${time}:${minites+10}:00.000Z`);
}
Expand Down

0 comments on commit 0ff8979

Please sign in to comment.