PHP strftime() ফাংশন
উদাহরণ
এক্সপ্রেসসিওন অনুযায়ী স্থানীয় তারিখ ও সময় ফরম্যাট করা
<?php
echo(strftime("%B %d %Y, %X %Z",mktime(20,0,0,12,31,98))."<br>");
setlocale(LC_ALL,"hu_HU.UTF8");
echo(strftime("%Y. %B %d. %A. %X %Z"));
?>
চালু করা
বিবরণ ও ব্যবহার
strftime() ফাংশন, এক্সপ্রেসসিওন অনুযায়ী স্থানীয় তারিখ ও সময় ফরম্যাট করে
সুঝানা:দেখুন gmstrftime() ফাংশন, এক্সপ্রেসসিওন অনুযায়ী GMT/UTC সময়/তারিখ ফরম্যাট করে
গঠন
strftime(format,timestamp);
পারামিটার |
বর্ণনা |
format |
অপরিহার্য। ফলাফল রপ্তানীর জন্য নির্দেশ
- %a - সপ্তাহের দিনের নামের সংক্ষিপ্ত রূপ
- %A - সপ্তাহের দিনের নামের পূর্ণ রূপ
- %b - মাসের নামের সংক্ষিপ্ত রূপ
- %B - মাসের নামের পূর্ণ রূপ
- %c - পছন্দ করা তারিখ ও সময় রূপান্তর
- %C - শতকের সংখ্যা (বছর / 100, 00 থেকে 99)
- %d - মাসের কোন দিন (01 থেকে 31)
- %D - সময় রূপান্তর, %m/%d/%y রূপান্তরের মতো
- %e - মাসের কোন দিন (1 থেকে 31)
- %g - %G রূপান্তরের মতো, কিন্তু শতক ছাড়া
- %G - ISO সপ্তাহ সংখ্যার সাথে সম্পর্কিত 4 সংখ্যাকালীন বছর (দেখুন %V)
- %h - %b রূপান্তরের মতো
- %H - ঘন্টা, 24 ঘন্টার রূপান্তরের মতো (00 থেকে 23)
- %I - ঘন্টা, 12 ঘন্টার রূপান্তরের মতো (01 থেকে 12)
- %j - বছরের কোন দিন (001 থেকে 366)
- %m - মাস (01 থেকে 12)
- %M - মিনিট
- %n - newline সিগন্যাল
- %p - দেওয়া সময় মানের অনুরূপ am বা pm
- %r - a.m. এবং p.m. সময় স্মারক
- %R - 24 ঘন্টার সময় স্মারক
- %S - সেকেন্ড
- %t - tab ট্যাব সিগন্যাল
- %T - বর্তমান সময়, %H:%M:%S রূপান্তরের মতো
- 蒧umeric representation of the day of the week (1 to 7), Monday[星期一] = 1. Warning: In Sun Solaris systems, Sunday[星期日] = 1
- %U - The number of weeks in the year, starting from the first Sunday of the year as the first week, as the first day of the first week
- %V - The number of weeks in the year according to the ISO 8601 format (01 to 53), week 1 represents the first week of the year, which must have at least four days and start with Monday as the first day of the week
- %W - The number of weeks in the year, starting from the first Monday of the year as the first week, as the first day of the first week
- %w - Decimal number representing the day of the week, Sunday[星期日] = 0
- %x - Preferred date representation without time
- %X - Preferred time representation without date
- %y - Year representation without the number of the century (range from 00 to 99)
- %Y - Year representation containing the number of the century
- %Z or %z - Time zone name or abbreviation
- %% - Output a % character
|
timestamp |
Optional. Specifies the Unix timestamp representing the date/time to be formatted. Defaults to the current time (time()) |
Technical Details
Return value: |
Returns based on format using the given timestamp formatted strings.
The names of months and days of the week and other language-related strings follow setlocale() current locale settings.
|
PHP Version: |
4+ |
Update Log: |
PHP 5.1.0: Added E_STRICT and E_NOTICE timezone errors. |