PHP Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
PHP Topics
Introduction Introduction
Syntax Syntax
Data Types Data Types
Operators Operators
Control Structures Control Structures
Functions Functions
Pre-defined Function Pre-defined Function
Calendar Functions Calendar Functions
Date and Time Date and Time
Array Functions Array Functions
Array List Array Functions List1
Array Function List Array Functions List2
Math Functions Math Functions
PHP MYSQL Functions PHP Mysql Functions
File Handling File Handling
Error Handling Error Handling
DB Size DB Size
PHP Mail PHP Mail
String Tokens String Tokens
String Functions String Functions
String Functions List String Functions List1
String Functions List2 String Functions List2
Session Functions Session Functions
Cookies Functions Cookies Functions
Form Variables Form Variables
Running PHP from JS Running PHP from JS
Array To JS Array To JS
JS Array Array to PHP
Encryption Encryption
Common Header Common Header
Forums Ask Your Doubts
Scraps More about PHP
Feedback Feedback
 




Date/Time Functions in PHP


Tutorials »Php »

Topic

PHP Date and Time Functions.



Explanation

In PHP there are some Pre-defined or built in Date/Time functions.

Following are some of the Pre Defined Date/Time Functions
checkdate
  -Validate a Gregorian date
date_add - Alias of DateTime::add
date_create_from_format - Alias of DateTime::createFromFormat
date_create - Returns new DateTime object
date_date_set -Alias of DateTime::setDate
date_default_timezone_get -Gets the default timezone used by all date/time functions in a script
date_default_timezone_set -Sets the default timezone used by all date/time function in a script
date_diff -Alias of DateTime::diff
date_format -Alias of DateTime::format
date_get_last_errors -Alias of DateTime::getLastErrors
date_interval_create_from_date_string -Alias of DateInterval::createFromDateString
date_interval_format -Alias of DateInterval::format
date_isodate_set -Alias of DateTime::setISODate
date_modify -Alias of DateTime::modify
date_offset_get -Alias of DateTime::getOffset
date_parse_from_format -Get info about given date
date_parse -Returns associative array with detailed info about given date
date_sub -Alias of DateTime::sub
date_sun_info -Returns an array with information about sunset/sunrise, twilight begin/end
date_sunrise -Returns time of sunrise for a given day and location
date_sunset -Returns time of sunset for a given day and location
date_time_set -Alias of DateTime::setTime
date_timestamp_get -Alias of DateTime::getTimestamp
date_timestamp_set -Alias of DateTime::setTimestamp
date_timezone_get -Alias of DateTime::getTimezone
date_timezone_set -Alias of DateTime::setTimezone
date -Format a local time/date
getdate -Get date/time information
gettimeofday -Get current time
gmdate -Format a GMT/UTC date/time
gmmktime -Get Unix timestamp for a GMT date
gmstrftime -Format a GMT/UTC time/date according to locale settings
idate -Format a local time/date as integer
localtime -Get the local time
microtime -Return current Unix timestamp with microseconds
mktime -Get Unix timestamp for a date
strftime -Format a local time/date according to locale settings
strptime -Parse a time/date generated with strftime
strtotime -Parse about any English textual datetime description into a Unix timestamp
time -Return current Unix timestamp
timezone_abbreviations_list -Alias of DateTimeZone::listAbbreviations
timezone_identifiers_list -Alias of DateTimeZone::listIdentifiers
timezone_location_get -Alias of DateTimeZone::getLocation
timezone_name_from_abbr -Returns the timezone name from abbrevation
timezone_name_get -Alias of DateTimeZone::getName
timezone_offset_get -Alias of DateTimeZone::getOffset
timezone_open -Returns new DateTimeZone object
timezone_transitions_get -Alias of DateTimeZone::getTransitions







A Note

Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial. Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.

Other Links

web hosting