
|
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7">strtotime (PHP 3>= 3.0.12, PHP 4 ) strtotime --
英文形å¼ã®æ—¥ä»˜ã‚’UNIXタイムスタンプã«å¤‰æ›ã™ã‚‹
説明int strtotime ( string time, int [now])
ã“ã®é–¢æ•°ã¯è‹±æ–‡å½¢å¼ã®æ—¥ä»˜ã‚’å«ã‚€æ–‡å—åˆ—ãŒæŒ‡å®šã•れるã“ã¨ã‚’期待ã—ã¦ãŠ
りã€ãã®å½¢å¼ã‹ã‚‰UNIXタイムスタンプã¸ã®å¤‰æ›ã‚’試ã¿ã¾ã™ã€‚
例 1strtotime()ã®ä¾‹ echo strtotime ("now"), "\n";
echo strtotime ("10 September 2000"), "\n";
echo strtotime ("+1 day"), "\n";
echo strtotime ("+1 week"), "\n";
echo strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime ("next Thursday"), "\n";
echo strtotime ("last Monday"), "\n"; |
|
例 2失敗ã®ãƒã‚§ãƒƒã‚¯ $str = 'Not Good';
if (($timestamp = strtotime($str)) === -1) {
echo "The string ($str) is bogus";
} else {
echo "$str == ". date('l dS of F Y h:i:s A',$timestamp);
} |
|
注æ„
ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ—ã®æœ‰åйãªç¯„囲ã¯ã€é€šå¸¸ã€Fri, 13 Dec 1901 20:45:54
GMTã‹ã‚‰Tue, 19 Jan 2038 03:14:07 GMTã¾ã§ã§ã™ã€‚(ã“れらã¯ã€32ビッ
ト符å·ä»˜æ•´æ•°ã®æœ€å¤§åŠã³æœ€å°ã«ä¸€è‡´ã—ã¾ã™ã€‚)
|