LoginSignup
0

More than 5 years have passed since last update.

PHPの日付まとめ

Posted at

memo

date() ローカルの日付、時刻を書式化する
strftime() ロケール設定に基づいた日付、時刻を書式化する

strftime() date() 出力 2018年5月1日
15時5分20秒(火)での例
%d d 日付(2桁) 01
%a D 曜日(3文字) Tue
%m m    月(2桁) 05
%b M 月(3文字) May
%y y 年(2桁) 18
%Y Y 年(4桁) 2018
%D m/d/y 月/日/年 05/01/18
%H H 24時間 15
%I h 12時間 03
%M i 分(2桁) 05
%S s 秒(2桁) 20

iってなんなんだ…

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0