Automattic\WooCommerce\Admin\DateTimeProvider

CurrentDateTimeProvider{}WC 1.0

Current DateTime Provider.

Uses the current DateTime.

No Hooks.

Usage

$CurrentDateTimeProvider = new CurrentDateTimeProvider();
// use class methods

Methods

  1. public get_now()

CurrentDateTimeProvider{} code WC 9.3.3

class CurrentDateTimeProvider implements DateTimeProviderInterface {
	/**
	 * Returns the current DateTime.
	 *
	 * @return DateTime
	 */
	public function get_now() {
		return new \DateTime();
	}
}