個人用ツール

「ver4/関数リファレンス/getContentCreatedDate」の版間の差分

提供: baserCMS公式ガイド

移動: 案内, 検索
行2: 行2:
  
 
## 説明
 
## 説明
コンテンツ作成日を取得
+
コンテンツ作成日を取得する
  
 
## 使い方
 
## 使い方
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
$this->BcBaser->getContentCreatedDate([$format]);
+
<?php $this->BcBaser->getContentCreatedDate([$format]); ?>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
## パラメータ
 
## パラメータ
$format
+
(string)$format
 
: フォーマット
 
: フォーマット
: 初期値: 'Y/m/d H:i'
+
: - 初期値: 'Y/m/d H:i'
  
 
## 戻り値
 
## 戻り値
 
+
(string)
コンテンツ作成日
+
: コンテンツ作成日
  
  
 
## 用例
 
## 用例
 
### 基本
 
### 基本
 +
コンテンツ作成日を取得し、echoで出力する。
 
####コード
 
####コード
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
+
<?php echo $this->BcBaser->getContentCreatedDate(); ?>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
####出力
 
####出力
 
<syntaxhighlight lang="html5">
 
<syntaxhighlight lang="html5">
 
+
2018/10/16 23:30
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
### 応用
 
### 応用
 +
コンテンツ作成日を指定した日付関数で取得し、echoで出力する。
 
####コード
 
####コード
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
+
<?php echo $this->BcBaser->getContentCreatedDate('M. j. D'); ?>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
####出力
 
####出力
 
<syntaxhighlight lang="html5">
 
<syntaxhighlight lang="html5">
 
+
Oct. 16. Tue
 
</syntaxhighlight>
 
</syntaxhighlight>
  

2018年10月24日 (水) 23:53時点における版

[このコンテンツは内容調整中です]

説明

コンテンツ作成日を取得する

使い方

<?php $this->BcBaser->getContentCreatedDate([$format]); ?>

パラメータ

(string)$format
フォーマット
- 初期値: 'Y/m/d H:i'

戻り値

(string)
コンテンツ作成日

用例

基本

コンテンツ作成日を取得し、echoで出力する。

コード

<?php echo $this->BcBaser->getContentCreatedDate(); ?>

出力

2018/10/16 23:30

応用

コンテンツ作成日を指定した日付関数で取得し、echoで出力する。

コード

<?php echo $this->BcBaser->getContentCreatedDate('M. j. D'); ?>

出力

Oct. 16. Tue

変更履歴

ソースファイル

関連資料

類似の関数