php strftime datetime

Solutions on MaxInterview for php strftime datetime by the best coders in the world

showing results for - "php strftime datetime"
Juan
21 Jul 2018
1<?php
2setlocale(LC_TIME, "C");
3echo strftime("%A");
4setlocale(LC_TIME, "fi_FI");
5echo strftime(" in Finnish is %A,");
6setlocale(LC_TIME, "fr_FR");
7echo strftime(" in French %A and");
8setlocale(LC_TIME, "de_DE");
9echo strftime(" in German %A.\n");
10// Syntax: strftime ( string $format [, int $timestamp = time() ] ) : string
11/*
12Parameters:
13The following characters are recognized in the format parameter string
14format	Description	Example returned values
15Day	---	---
16%a	An abbreviated textual representation of the day	Sun through Sat
17%A	A full textual representation of the day	Sunday through Saturday
18%d	Two-digit day of the month (with leading zeros)	01 to 31
19%e	Day of the month, with a space preceding single digits. Not implemented as described on Windows. See below for more information.	1 to 31
20%j	Day of the year, 3 digits with leading zeros	001 to 366
21%u	ISO-8601 numeric representation of the day of the week	1 (for Monday) through 7 (for Sunday)
22%w	Numeric representation of the day of the week	0 (for Sunday) through 6 (for Saturday)
23Week	---	---
24%U	Week number of the given year, starting with the first Sunday as the first week	13 (for the 13th full week of the year)
25%V	ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week	01 through 53 (where 53 accounts for an overlapping week)
26%W	A numeric representation of the week of the year, starting with the first Monday as the first week	46 (for the 46th week of the year beginning with a Monday)
27Month	---	---
28%b	Abbreviated month name, based on the locale	Jan through Dec
29%B	Full month name, based on the locale	January through December
30%h	Abbreviated month name, based on the locale (an alias of %b)	Jan through Dec
31%m	Two digit representation of the month	01 (for January) through 12 (for December)
32Year	---	---
33%C	Two digit representation of the century (year divided by 100, truncated to an integer)	19 for the 20th Century
34%g	Two digit representation of the year going by ISO-8601:1988 standards (see %V)	Example: 09 for the week of January 6, 2009
35%G	The full four-digit version of %g	Example: 2008 for the week of January 3, 2009
36%y	Two digit representation of the year	Example: 09 for 2009, 79 for 1979
37%Y	Four digit representation for the year	Example: 2038
38Time	---	---
39%H	Two digit representation of the hour in 24-hour format	00 through 23
40%k	Hour in 24-hour format, with a space preceding single digits	0 through 23
41%I	Two digit representation of the hour in 12-hour format	01 through 12
42%l (lower-case 'L')	Hour in 12-hour format, with a space preceding single digits	1 through 12
43%M	Two digit representation of the minute	00 through 59
44%p	UPPER-CASE 'AM' or 'PM' based on the given time	Example: AM for 00:31, PM for 22:23
45%P	lower-case 'am' or 'pm' based on the given time	Example: am for 00:31, pm for 22:23
46%r	Same as "%I:%M:%S %p"	Example: 09:34:17 PM for 21:34:17
47%R	Same as "%H:%M"	Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM
48%S	Two digit representation of the second	00 through 59
49%T	Same as "%H:%M:%S"	Example: 21:34:17 for 09:34:17 PM
50%X	Preferred time representation based on locale, without the date	Example: 03:59:16 or 15:59:16
51%z	The time zone offset. Not implemented as described on Windows. See below for more information.	Example: -0500 for US Eastern Time
52%Z	The time zone abbreviation. Not implemented as described on Windows. See below for more information.	Example: EST for Eastern Time
53Time and Date Stamps	---	---
54%c	Preferred date and time stamp based on locale	Example: Tue Feb 5 00:45:10 2009 for February 5, 2009 at 12:45:10 AM
55%D	Same as "%m/%d/%y"	Example: 02/05/09 for February 5, 2009
56%F	Same as "%Y-%m-%d" (commonly used in database datestamps)	Example: 2009-02-05 for February 5, 2009
57%s	Unix Epoch Time timestamp (same as the time() function)	Example: 305815200 for September 10, 1979 08:40:00 AM
58%x	Preferred date representation based on locale, without the time	Example: 02/05/09 for February 5, 2009
59Miscellaneous	---	---
60%n	A newline character ("\n")	---
61%t	A Tab character ("\t")	---
62%%	A literal percentage character ("%")	---
63*/
64?>
65
66
Callum
25 Mar 2016
1setlocale(LC_TIME, 'it_IT.UTF-8');
2$date = new DateTime($run['at']);
3strftime("%d %B", $date->getTimestamp())
queries leading to this page
strftime php docstrftime in phpstrftime php examplephp strinbg so strtimephp strftime locale month namestrftime php 25astrftime en anglais phpdate to strftime phpphp strftime formatphp date format localizedphp date languagestrftime 25dshow mysql date locale format phpstrftime in php examplesphp strftotimeless seconds time php strftimedate function with sttotime in phpstrftimestrftime 28 22 25a 22 29 phpphp convert time to strtimephp date localizationdate php languagephp date string to format languagephp new date localeformatlocalized phpphp date localeformat localized phpstrftime phpdoes strftime accepet string phpphp strftime dutchphp format localizedstrftime datetime phppm format in greek phpphp sfrtime less thanstrftime 28 27 25a 2c 25e 25b 25y 27 29php strftime locale monthstrftime next day phpstrftime nl phpstrftime php 5get date time current locale phphow to locale date in phpdatetime strftime phpstringtotime in phpstrftime with date and time phpfr fr time phpphp localised date and timeless minutes time php strftimephp strftime timephp strftimephp strptimestrftime php werkt nietstrftime php from datestrftime php zstrtime date format phpphp parse iso locale from us enget current datetime in php in localelanguage php date 24date 3eformat locale7995 str in time phpphp hour minutes dutch formatam and pm not show strftimephp date format languagephp format date localelaravel format date month languagephp strtime monthphp datetime stringstrptimephp strftime datetimestrftime 28 29 in phpstrftime in htmlstr time in phpstrptime phpdate format localized phpphp strftime 28 29date format php localestrftime time less or add phpformat japanese date and time am 2fpm in phpphp strftime languagephp datetime time strptimedatetime to string phpphp locale datedate in local language phpdate format language phpday strftime 28 22 25b 25d 2c 25y 22 29php strftime datetime