N
N
Nertyk2019-03-29 16:24:14
Yii
Nertyk, 2019-03-29 16:24:14

How to properly create a function to compare two dates?

Good evening. I need to use cron to check every day today's date and the date until which date the product can be put up for sale (this date is already set in the table). If the deadline has passed, then disable the button in the GridView. There is a normal checkbox. I've never dealt with cron and don't know how to solve it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2019-04-15
@webinar

Why would you want to do this with a cron? When building a gridView, it's much easier to hide the button. There is even a method out of the box for this:
https://www.yiiframework.com/doc/api/2.0/yii-grid-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question