دروس PHP

PHP الرئيسية مقدمة PHP تثبيت PHP بناء جملة PHP تعليقات PHP متغيرات PHP PHP صدى / طباعة أنواع بيانات PHP سلاسل PHP أرقام PHP PHP الرياضيات ثوابت PHP مشغلي PHP PHP إذا ... آخر ... Elseif مفتاح PHP حلقات PHP وظائف PHP مصفوفات PHP PHP Superglobals PHP RegEx

نماذج PHP

معالجة نموذج PHP التحقق من صحة نموذج PHP نموذج PHP مطلوب نموذج PHP URL / البريد الإلكتروني اكتمل نموذج PHP

PHP متقدم

تاريخ ووقت PHP تضمين PHP معالجة ملفات PHP فتح / قراءة ملف PHP إنشاء / كتابة ملف PHP تحميل ملف PHP ملفات تعريف الارتباط PHP جلسات PHP مرشحات PHP مرشحات PHP متقدم وظائف رد الاتصال PHP PHP JSON استثناءات PHP

PHP OOP

PHP ما هو OOP فئات / كائنات PHP منشئ PHP مدمر PHP معدِّلات الوصول إلى PHP الوراثة PHP ثوابت PHP فئات مجردة PHP واجهات PHP سمات PHP طرق PHP الثابتة خصائص PHP الثابتة مساحات أسماء PHP PHP تكرارات

قاعدة بيانات MySQL

قاعدة بيانات MySQL اتصال MySQL إنشاء قاعدة بيانات MySQL إنشاء جدول MySQL MySQL إدراج البيانات MySQL الحصول على آخر معرف إدراج عدة MySQL تم تجهيز MySQL MySQL حدد البيانات MySQL أين ترتيب MySQL حسب MySQL حذف البيانات تحديث بيانات MySQL بيانات MySQL المحدودة

لغة PHP XML

موزعي PHP XML محلل PHP SimpleXML PHP SimpleXML - احصل على PHP XML Expat PHP XML DOM

PHP - أجاكس

مقدمة أجاكس أجاكس بي إتش بي قاعدة بيانات أجاكس AJAX XML بحث أجاكس لايف استطلاع أجاكس

أمثلة PHP

أمثلة PHP مترجم PHP اختبار PHP تمارين PHP شهادة PHP

مرجع PHP

نظرة عامة على PHP صفيف PHP تقويم PHP تاريخ PHP دليل PHP خطأ PHP استثناء PHP نظام ملفات PHP مرشح PHP PHP FTP PHP JSON كلمات PHP PHP Libxml PHP Mail PHP الرياضيات متفرقات PHP PHP MySQLi شبكة PHP التحكم في إخراج PHP PHP RegEx PHP SimpleXML PHP ستريم سلسلة PHP معالجة متغيرة PHP محلل PHP XML PHP Zip المناطق الزمنية PHP

PHP gmstrftime () الوظيفة

❮ PHP مرجع التاريخ / الوقت

مثال

تنسيق التاريخ والوقت GMT / UTC وفقًا لإعدادات المنطقة المحلية:

<?php
echo(gmstrftime("%B %d %Y, %X %Z",mktime(20,0,0,12,31,98))."<br>");
setlocale(LC_ALL,"hu_HU.UTF8");
echo(gmstrftime("%Y. %B %d. %A. %X %Z"));
?>

التعريف والاستخدام

تعمل وظيفة gmstrftime () على تنسيق وقت و / أو تاريخ GMT / UTC وفقًا لإعدادات اللغة.

تلميح: انظر أيضًا إلى وظيفة strftime () ، التي تعمل على تنسيق التوقيت المحلي و / أو التاريخ وفقًا لإعدادات اللغة.


بناء الجملة

gmstrftime(format, timestamp)

قيمه المعامل

Parameter Description
format Required. Specifies how to return the result:
  • %a - abbreviated weekday name
  • %A - full weekday name
  • %b - abbreviated month name
  • %B - full month name
  • %c - preferred date and time representation
  • %C - century number (the year divided by 100, range 00 to 99)
  • %d - day of the month (01 to 31)
  • %D - same as %m/%d/%y
  • %e - day of the month (1 to 31)
  • %g - like %G, but without the century
  • %G - 4-digit year corresponding to the ISO week number (see %V).
  • %h - same as %b
  • %H - hour, using a 24-hour clock (00 to 23)
  • %I - hour, using a 12-hour clock (01 to 12)
  • %j - day of the year (001 to 366)
  • %m - month (01 to 12)
  • %M - minute
  • %n - newline character
  • %p - either am or pm according to the given time value
  • %r - time in a.m. and p.m. notation
  • %R - time in 24 hour notation
  • %S - second
  • %t - tab character
  • %T - current time, equal to %H:%M:%S
  • %u - weekday as a number (1 to 7), Monday=1. Warning: In Sun Solaris Sunday=1
  • %U - week number of the current year, starting with the first Sunday as the first day of the first week
  • %V - The ISO 8601 week number of the current year (01 to 53), where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week
  • %W - week number of the current year, starting with the first Monday as the first day of the first week
  • %w - day of the week as a decimal, Sunday=0
  • %x - preferred date representation without the time
  • %X - preferred time representation without the date
  • %y - year without a century (range 00 to 99)
  • %Y - year including the century
  • %Z or %z - time zone or name or abbreviation
  • %% - a literal % character
timestamp Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time())


تفاصيل تقنية

قيمة الإرجاع: تُرجع سلسلة منسقة وفقًا للتنسيق باستخدام الطابع الزمني المحدد . تحترم أسماء الشهر وأيام الأسبوع والسلاسل الأخرى المعتمدة على اللغة الإعدادات المحلية المعينة بـ setlocale ()
إصدار PHP: 4+

❮ PHP مرجع التاريخ / الوقت