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

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.

Download code
  • Episode 01 • Duration 15:44

    October Setup

  • Episode 02 • Duration 13:27

    Vue Setup

  • Episode 03 • Duration 23:22

    Tailwind CSS

  • Episode 04 • Duration 21:05

    What is Vuex?

  • Episode 05 • Duration 18:33

    Homepage UI

  • Episode 06 • Duration 15:19

    Locations API

  • Episode 07 • Duration 08:28

    Connecting Locations and Vehicles

  • Episode 08 • Duration 19:07

    Filtering By Location

  • Episode 09 • Duration 07:36

    Filtering On API

  • Episode 10 • Duration 18:07

    Vehicle API

  • Episode 11 • Duration 10:25

    Availability

  • Episode 12 • Duration 13:36

    Router

  • Episode 13 • Duration 11:30

    Dates Backend

  • Episode 14 • Duration 28:04

    Dates Frontend

  • Episode 15 • Duration 15:06

    Luxon

  • Episode 16 • Duration 09:01

    Persisting dates

  • Episode 17 • Duration 20:09

    Login and Registration (with JWT)

  • Episode 18 • Duration 17:09

    Persisting State

  • Episode 19 • Duration 26:57

    Making Reservation

  • Episode 20 • Duration 08:11

    Fixing JWT

  • Episode 21 • Duration 16:35

    Login Errors

  • Episode 22 • Duration 05:00

    Logout

  • Episode 01 • Duration 15:44

    October Setup

  • Episode 02 • Duration 13:27

    Vue Setup

  • Episode 03 • Duration 23:22

    Tailwind CSS

  • Episode 04 • Duration 21:05

    What is Vuex?

  • Episode 05 • Duration 18:33

    Homepage UI

  • Episode 06 • Duration 15:19

    Locations API

  • Episode 07 • Duration 08:28

    Connecting Locations and Vehicles

  • Episode 08 • Duration 19:07

    Filtering By Location

  • Episode 09 • Duration 07:36

    Filtering On API

  • Episode 10 • Duration 18:07

    Vehicle API

  • Episode 11 • Duration 10:25

    Availability

  • Episode 12 • Duration 13:36

    Router

  • Episode 13 • Duration 11:30

    Dates Backend

  • Episode 14 • Duration 28:04

    Dates Frontend

  • Episode 15 • Duration 15:06

    Luxon

  • Episode 16 • Duration 09:01

    Persisting dates

  • Episode 17 • Duration 20:09

    Login and Registration (with JWT)

  • Episode 18 • Duration 17:09

    Persisting State

  • Episode 19 • Duration 26:57

    Making Reservation

  • Episode 20 • Duration 08:11

    Fixing JWT

  • Episode 21 • Duration 16:35

    Login Errors

  • Episode 22 • Duration 05:00

    Logout