将不同语言的日期字符串转换为Datetime格式

时间:2016-06-24 09:16:58

标签: php datetime

我尝试在PHP中将此字符串:package database import com.github.tminglei.slickpg._ trait MyPostgresDriver extends ExPostgresDriver with PgArraySupport with PgDate2Support with PgPlayJsonSupport with PgNetSupport with PgLTreeSupport with PgRangeSupport with PgHStoreSupport with PgSearchSupport with PgPostGISSupport { override val pgjson = "jsonb" override lazy val Implicit = new ImplicitsPlus {} override val simple = new SimpleQLPlus {} trait ImplicitsPlus extends Implicits with ArrayImplicits with DateTimeImplicits with RangeImplicits with HStoreImplicits with JsonImplicits with SearchImplicits with PostGISImplicits trait SimpleQLPlus extends SimpleQL with ImplicitsPlus with SearchAssistants with PostGISAssistants override val api = new API with ArrayImplicits with DateTimeImplicits with PlayJsonImplicits with NetImplicits with LTreeImplicits with RangeImplicits with HStoreImplicits with SearchImplicits with PostGISImplicits with SearchAssistants {} } object MyPostgresDriver extends MyPostgresDriver 转换为Août 2016格式。 它完全适用于使用datetime的英文格式(2016年8月),但不能使用其他语言。

提前谢谢!

1 个答案:

答案 0 :(得分:0)

看看:http://php.net/manual/en/intldateformatter.parse.php 但你必须知道使用的语言。