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


Top ↑

Return Return

(string)


Top ↑

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 );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.9.0
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.