Skip to content

Commit

Permalink
fix bug 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Quanmuito committed Jan 27, 2024
1 parent 749fa1c commit 5af01ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/calculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const CONFIG: {[index: string]: Config} = {
DISTANCE: {
MIN: 1000,
INTERVAL: 500,
SURCHAGE_MIN: 2,
SURCHAGE_INTERVAL: 1,
SURCHARGE_MIN: 2,
SURCHARGE_INTERVAL: 1,
},
NUMBER: {
INTERVAL: 1,
Expand Down Expand Up @@ -55,8 +55,8 @@ export const isRushHour = (orderTime: string): boolean => {
const date = new Date(orderTime);
// Friday after 3PM and before 7PM
return date.getDay() === CONFIG.RUSH_HOUR.DAY
&& date.getHours() >= CONFIG.RUSH_HOURS.START
&& date.getHours() < CONFIG.RUSH_HOURS.END;
&& date.getHours() >= CONFIG.RUSH_HOUR.START
&& date.getHours() < CONFIG.RUSH_HOUR.END;
};

const getFinalFee = (fee: number): number => (fee < CONFIG.FEE.MAX) ? fee : CONFIG.FEE.MAX;
Expand Down

0 comments on commit 5af01ff

Please sign in to comment.