LLMS_Quiz_Attempt::get_date( string $key, string $format = null )
Retrieve a formatted date
Parameters Parameters
- $key
-
(string) (Required) 'start' or 'end'.
- $format
-
(string) (Optional) Output date format (PHP), uses WordPress format options if none provided. If not provided defaults to WP date format options.
Default value: null
Return Return
(string)
Source Source
File: includes/models/model.llms.quiz.attempt.php
public function get_date( $key, $format = null ) { $date = strtotime( $this->get( $key . '_date' ) ); $format = ! $format ? get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) : $format; return date_i18n( $format, $date ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.9.0 | |
3.16.0 | Introduced. |