Recognize date text in Brazilian format

Asked

Viewed 61 times

1

Does anyone know any way to recognize text of Brazilian dates like, today, tomorrow, 30/04... on PHP using the function strtotime or in the Cakephp using CakeTime.

I’m trying to get the same result using strtotime('amanhã') when it is used strtotime('tomorrow'), and mainly on dates only with day and month as strtotime('03/04') not be recognised as 4 March but 3 April.

  • Not so, buddy. Functions are only in dialect inglês, you passing the parameter in English the function will not work. Now, answering this first question, what is the second? Everything is standard, see documentation http://php.net/manual/en/function.strtotime.php

  • Have you seen this link? http://stackoverflow.com/questions/33098968/how-to-display-datetime-form-mysql-using-cakephp-3-0

  • I am aware of this @juniorb2ss, but I am looking to know if there is any way to receive translated dates so I can use this in a search field in the database, if there is no I can manage creating something simpler.

  • No, this does not exist. You can make an associative array with what is dialect in Portuguese and what is in English. This library can help you with date abstraction: http://carbon.nesbot.com/docs/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.