Creating Rent-a-Car App with Vue and October Episode 15

Luxon

In this episode we are going to be using Luxon plugin to format and calculate our dates in our Vue app.

Now, on our vehicle details page we want to display formatted dates, we want to calculate how many days is between pickup date and drop off date, and then calculate the price that our users will have to pay for the reservation based on price by day that we are getting from our October CMS api.

Of course we could do that “by hand” by using the power of JavaScript, but since we don’t want to reinvent the wheel we are going to be using great JS plugin called Luxon, which is going to do all the heavy lifting for us, and also make our code much more readable.

Wanna ask a question about video?

Like This Video?

Support it by sharing it ;)

© Watch And Learn,2024