How to calculate delivery date in product page

Prakash Prabhakar|4/16/2018, UTC|1 MIN READ|
//How to calculate delivery date in product page


Many eCommerce companies often want to show an estimated delivery date of a product. So, a customer can expect product by that date.

Most of the developers calculate delivery date using JS. And I was also one of them. We use JavaScript because it’s easy but at the same time it is risky.

Why JavaScript is risky.

As we all know JavaScript is a client-side scripting language and it uses time and date from the user's computer and mobile. But, the user's time and date may be different from the merchant store time and date.


The best way is one should calculate time and date using merchant's store time.
Here is the code  for 3 days calculation from today’s date.

Prakash Prabhakar


Looking for



Lets Discuss

Why Lucent...



Learning comes not only with training but it comes as we facilitate the learning of the organization as well as individuals and the clients continuously refurbishing ourselves.



We believe in Innovation and have started our company based on that concept. When you don't transform you become stagnant.
Innovation arrow Transformation
arrow Growth.


Team Work

We work efficiently as a team. We self-monitor. We deliver results efficiently with the help of multiple perspectives and skill sets. We form strong working relationships as we communicate well with each other.

Lucent innovation
We are a family filled with talented experts that help global brands, enterprises, mid-size businesses or even startups with innovative solutions.
Accelerate your tech projects with us. Get in touch with us.
Follow us
lucent innnovation: cltuch

Lucent Innovation, © 2023. All rights reserved.Privacy policyDMCA compliant image