This lesson we're going to be building out the current time value and we can use that with JavaScript,
with the date object, so setting up a temp value for the date, we're using the new date object and
we're also getting the value from that input field.
And as you can see, when I do console log, whatever element triggered off the event, we can use this
and then we can use this value to get that content.
And we've also got it within that input as well.
So we could also do it as end date value as well.
So either one will work and then we're setting up that new date.
We're going to pass that end date value into it and then output that new temp value.
I'll see what that looks like as well.
So it's going to be within our date object.
So a console log out the value of temp as well.
So now whenever I go into this input, I change the value we see.
We get the value that's available within the input field.
But in order to use it in JavaScript and get all of the exact hours, minutes, seconds and so on,
we need to format it within a date object.
And that's going to give us some additional parameters there to work with.
And those are what we need in order to calculate out hours and seconds and so on.
So that's where we're using that date object and that allows us to format it properly and use it within
our calculations.
So now that we've got our temporary date object, we can create a function and we can output the clock.
So start clock and within here we can send through whatever the value of temp is.
So setting up a function to handle that new clock building.
And we'll just call this one D, the value that we're passing to start clock.
So this essentially is our end time that we have to work with.
Now, let's select our content and let's make a calculation about how much time is remaining.
And we need to create a function in order to handle that.
So we're passing in the value D.
And coming up next, I'll show you how we can handle that.
So we need to do a calculation of time left.
And passing in that time once again, and we'll set that function up in the upcoming lesson.
So for now, create a new function to handle the starting of the clock.
And this is where we're going to set up and we're going to also update the output there that's visible
to the user.
So all of that is still yet to come.