MWTimestamp: Allow providing a DateTime object directly
authorKunal Mehta <legoktm@member.fsf.org>
Mon, 22 Aug 2016 02:17:01 +0000 (19:17 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Mon, 22 Aug 2016 02:17:01 +0000 (19:17 -0700)
commit144ca9c5feaf9c7b0a8b9d5523233200e835e842
tree3105ddfa2026eba70f6efacbb57aacae5ee5ed25
parent93bca4fbe480d0b407e2ae2b1b7b3d6d00c83cf4
MWTimestamp: Allow providing a DateTime object directly

For cases where you already have a DateTime object on hand and want to
use MWTimestamp's formatting code. Since MWTimestamp stores DateTime
objects internally, just set it to the $timestamp member variable.

Change-Id: Ie60392e32743d4d082d2c9347ef68418d5eb86ad
includes/MWTimestamp.php