Google\Spreadsheet\Spreadsheet::getUpdated PHP Method

getUpdated() public method

Get the updated date
public getUpdated ( ) : DateTime
return DateTime
    public function getUpdated()
    {
        return new \DateTime($this->xml->updated->__toString());
    }

Usage Example

 public function testGetUpdated()
 {
     $xml = file_get_contents(__DIR__ . '/xml/spreadsheet.xml');
     $spreadsheet = new Spreadsheet(new SimpleXMLElement($xml));
     $this->assertTrue($spreadsheet->getUpdated() instanceof DateTime);
     $this->assertEquals('2014-02-07 18:33:44', $spreadsheet->getUpdated()->format('Y-m-d H:i:s'));
 }
All Usage Examples Of Google\Spreadsheet\Spreadsheet::getUpdated