Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Entry::find()->startDate('>='. $someTime).endTime('<='.$someOtherTime).all();
- Entry::find()
- ->variantOne('<=' . Db::prepareDateForDb(new DateTime())) <-- DateTime object
- ->variantTwo('<=' . time()) <-- as timestamp
- ->variantThree('<=' . (new DateTime())->format('U')) <-- timestamp as well
- ->variant(['and', '<=' . time() , '>=' . time() - 3600]) <-- entries within the last hour
Add Comment
Please, Sign In to add comment