 And there's my thumbnail. Did that look like I was thinking about what tomorrow is? We're continuing working with dates in our shell scripts. Last video we looked at the date command and how you can give it a date and format that date in many different ways and validate the date and make sure that what users enter is a valid date and then you can format however you need for your code. Today it's going to be a little bit shorter video. I hope it's going to be looking at how to figure out, how to take a date and figure out what the next day is or the next day or the next day or the day before or 100 days or 500 days or 1,000 days after that and just figure that stuff out. It will be useful in a following video. So enjoy this video. I hope you learned something. Let's get started. Okay, here we go. So again, type date, it gives you a date. We talked about in the last video we can do a dash D and give it a date such as Gen 1, 1999 and it will give us the output of that date and of course we can tell it how we want it to be formatted so we can do dash I as an example for year month day. But we can also take this and give it a day and say plus one day or is it just one D? One day. I think you can also just put one D. No, just one day. Okay. I should know I'm the one doing the tutorial about it. So you can see that it's gone. It's continued. That's one day. We can say what's 10 days later? We can say what's 100 days later? We can also go the other way. What was 100 days before that? Doing minus. And of course we can also do something like plus percent. Is it A for day of the week? Yeah. So again, we can say, okay. January 1st, January 2nd is a Friday. Right? Sorry, January 1st is a Friday. Plus one day. Well, we know that's a Saturday. And of course we are also giving it a day. We can also just say dash D and not give a date. It's going to assume today, but we're going to say plus one day. So tomorrow is Sunday. 10 days from now is a Tuesday. 35 days from now is a Saturday. Or again, we can see the entire date. So this can be very useful. So let's quickly look at a quick little script I've written here. What are we doing in this script? Okay. First thing we're going to do is going to read. We're going to print a message to the screen. So read, print this message. Enter start date. Whatever the user inputs, we're going to set that as D. Unlike our last video, I didn't set any checks. Make sure they enter a valid date, which you shouldn't actual code. Just left it out of this. But that's definitely something you can implement and should. If this is code, you're going to give to somebody else. But what we are going to do is we are going to read what they input. We're then going to take what they input. And we're going to format that in the format we want. In this case, year, month, day with dashes in between them. And we're going to replace whatever they typed with the same date, but formatted how we wanted. We're going to do the same thing for an end date. We're going to ask them for an end date. Going to put it in a variable called end. We're going to replace that variable with that same date formatted in the format we want. Now, we are going to loop through this as long as those two dates don't match. But what we're going to do every time we loop, we're going to echo out the date. So if I put in January 1st, 1999, it's going to echo out January 1st, 1999. In the format I specify, then we're going to replace that date with one day later. Formatted the same way. We're going to loop. Going to check. Is that the same? So now I can put in a start date and an end date. And as long as I input proper dates and the end date is after the start date, it will loop through a number of days. So to run this, I'm just going to dot slash my code. I'm going to enter a date. Again, I can type this in native form. I'll just say Jan 1, 1999. And it's going to format how I want in the format we want. And second time, I can say 12, 31, 1999. And it doesn't matter that I type them in different ways. As long as they're valid dates, it's going to format them properly and loop through them. So now we're looping through every day that year. And each one of these is a valid date. We need trying to do this manually and say, OK, here's a year. Here's a month. Do 30 days. But if it's this month, do that. Date takes care of all of that for us. Let's go ahead and clear the screen. Run that code again. Let me say 1, 1, 1900. And I can say 12, 31, 1999. And it's going to loop through all those dates. Which, as you will see, in the next couple of videos, this is going to come in very handy with a program we're going to write where we're checking stuff online. And we need to pass valid dates to a web server in consecutive order. So I do thank you for watching this video. I hope you learned something. Maybe you'll see where we're going with this. Probably not, because there's lots of uses for this. So you probably don't see the exact one I'm thinking of. But hopefully you enjoyed this. If you did, like, share, subscribe, check out my Patreon page, all that stuff, links in the description, as well as links to this example code. I thank you for watching. And as always, I hope that you have a super great, fantastic, fabulous day with dates. Uh-huh.