サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
画力アップ
carbon.nesbot.com
Introduction The Carbon class is inherited from the PHP DateTime class. <?php namespace Carbon; class Carbon extends \DateTime { // code here } You can see from the code snippet above that the Carbon class is declared in the Carbon namespace. You need to import the namespace to use Carbon without having to provide its fully qualified name each time. use Carbon\Carbon; Examples in this documentatio
printf("Right now is %s", Carbon::now()->toDateTimeString()); printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); // automatically converted to string $tomorrow = Carbon::now()->addDay(); $lastWeek = Carbon::now()->subWeek(); // Carbon embed 823 languages: echo $tomorrow->locale('fr')->isoFormat('dddd, MMMM Do YYYY, h:mm'); echo $tomorrow->locale('ar')->isoFormat('dddd, MMMM
このページを最初にブックマークしてみませんか?
『Carbon - A simple PHP API extension for DateTime.』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く