function opigno_lrs_stats_start_of_current_year in Opigno TinCan API 7
Get start of current year
Return value
DateTime
2 calls to opigno_lrs_stats_start_of_current_year()
- opigno_lrs_stats_dashboard_total_number_of_page_view_json_page in modules/
opigno_tincan_api_stats/ includes/ dashboard/ dashboard.pages.inc - Display total number of page view in json (morris.js format)
- opigno_lrs_stats_filter_current_year_statements in modules/
opigno_tincan_api_stats/ includes/ model/ filters.inc - Filter statements that happened this year
File
- modules/
opigno_tincan_api_stats/ includes/ model/ helpers.inc, line 55 - Implements helper functions
Code
function opigno_lrs_stats_start_of_current_year() {
$date = new DateTime();
return $date
->modify('midnight January 1st');
}