{"version":"1.0","type":"rich","title":"Gist 073f04cf10ae55fafc00","description":"This example demonstrates a Yii PHP behavior that automatically formats and parses date fields in Active Record models, as seen with the `Person` model's `birthdate` and `last_checkin` attributes. The `DateFormatterBehavior` class intercepts the `beforeSave` event to convert timestamps into formatted date strings and parse user input back into timestamps using `CDateTimeParser`. It also provides a `checkDate` validation method, invoked via a model rule, to ensure date correctness. Configuration defines date formats like `short` as `d/M/yyyy`, with helper functions `df` and `parse_date` bridging Yii’s date formatter.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-073f04cf10ae55fafc00?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}