 Hello and welcome. We've been working with the date command in the Linux shell, which is a very useful command We looked at simple formatting of outputs also how you can put dates in and get information on those dates from the date command But you can also ask it general things Like kind of like you're talking to it because let's say, you know if we type in date it gives us today's date in time And if we say date dash D and we can give it a date like 1 3 2,000 actually, let's do 1999 and it will give us the date and time for that, but you can also say things to it like this What is tomorrow's date? That's tomorrow's date, and it's actually tomorrow. It gave you the time so it gave you exactly 24 hours in the future What if I want to know yesterday's date? I can type in yesterday and yesterday is invalid Of course, it also helps as always if you type the commands properly Not yesterday. It's yesterday. There we go yesterday's date, and of course you can give it different formats so I can do percent capital F to get the date like that Or if I want to know yesterday was Monday in case I forgot yesterday was Monday But again when you're coding that could be useful, you know, you can have a check like for tomorrow Plus F or plus a Wednesday so you can have a script run daily or Whenever you run it and it can instead of going oh today is Tuesday If Tuesday than this if Monday than that if you're trying to have something happen the day before Wednesday Like you want well that doesn't make so much sense because obviously would always be Tuesday But if for some reason you needed to know whether tomorrow was Wednesday or not you could check it this way It's all depends on your situation, but you can also ask for things like what is the date? Next Sunday so next Sunday is the 21st and it obviously it's a Sunday And I believe you should be able to do last Sunday, which is great trying to figure out, you know Dates and this is great, especially making a program think about everyone with smartphones you can say you know Hey, whatever your phone is or Whoever your little device on your counter is, you know I had to calendar for next Tuesday go to so-and-so's house for dinner and And it would add it. Well, this is how you would do it with a script You would take that text and you would see that they said next Sunday And now you have the date and you can add to your calendar, which you would probably add as an epoch stamp At least that's how I would do it at least in one column or Field of my database But yeah, you can do tomorrow you'd be next day Some other examples. Let me think another option would be date and then you can say something like let's do dash D here Um Ten days Do I have to put the plus sign? No, it tells me that's the date ten days from now. Oops that I meant to press a one or 11 there we go, or you can say minus 11 days or minus five days again if you're doing something that does notifications and you set a date, okay October 5th, I want some notification come but I also want notifications the day before that I can just say October 5th Like so and of course I typed it wrong Let's try that again. Let's just do ten five minus one. There we go. So October 5th minus one so you can do oh I want a notification So that's the date an event's happening and I want a notification two days before that or Three days before that And I you should be able to I haven't tried this. Let's say October 5th is when the event's happening and it's happening at 2 p.m. And I'm gonna say I want notification one Hours before that one of our works to yeah, so you can see The the time that you can get it and you can do plus percent s the time that you can get it That was a good explanation Chris E-pop time again So you can now calculate when your notifications happen and you can write a script that does multiple these so you just have The date that an event's happening, but you can figure out an hour before 30 minutes before my you know Whatever by putting whatever minus that or whatever plus that if you want times or dates after So you can have a notification happen at a certain time And then if that didn't happen if you didn't clear it out You know an hour later or 30 minutes later get more notifications until you clear it out You can do that very simply and I'm just amazed how smart the date command is at figuring these out It's just it's almost like you're just talking to it like you would your phone Which is probably using some Variation of this I wouldn't be surprised. Anyway, that is the date command and Figuring out whether you know when a time is in addition to the time you've given, you know, I'm trying to say So many days so many hours so many minutes Before after a given date so that's it. I do. Thank you for watching. Please visit films by Chris calm That's Chris the K. There's a link in description also think about supporting me also a link in description to my patreon page patreon.com Ford slash metal X1000 if you go to my website you can search on my videos or go to the sports section there You can support me through PayPal or patreon. I do. Thank you for watching as always. I hope that you have a great day