XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
91 stars 65 forks source link

Invoice Date and Due Date returns /Date(1588032000000+0000)/ #247

Closed neubreed closed 2 years ago

neubreed commented 3 years ago

Hi,

After creating an invoice $invoice->getDate() and $invoice->getDueDate() return a value like this:

/Date(1588032000000+0000)/

When I was expecting a DateTime string like 2021-09-09

How do I handle or change this behaviour?

SidneyAllen commented 2 years ago

Try using the AsDate methods $invoice->getDateAsDate()