Downloads
Documentation
Get Involved
Help
Search docs
PHP 8.4.0 RC4 available for testing
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
User Submitted Data
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
Introduzione »
« unixtojd
Manuale PHP
Guida Funzioni
Estensioni correlate a calendari ed eventi
Change language:
English
German
Spanish
French
Italian
Japanese
Brazilian Portuguese
Russian
Turkish
Ukrainian
Chinese (Simplified)
Other
Date and Time
Introduzione
Installazione/Configurazione
Installazione
Configurazione di Runtime
Costanti predefinite
Esempi
Date/Time Arithmetic
DateTime
— La classe DateTime
DateTime::add
— Modifies a DateTime object, with added amount of days, months, years, hours, minutes and seconds
DateTime::__construct
— Returns new DateTime object
DateTime::createFromFormat
— Parses a time string according to a specified format
DateTime::createFromImmutable
— Returns new DateTime instance encapsulating the given DateTimeImmutable object
DateTime::createFromInterface
— Returns new DateTime object encapsulating the given DateTimeInterface object
DateTime::getLastErrors
— Alias di DateTimeImmutable::getLastErrors
DateTime::modify
— Alters the timestamp
DateTime::__set_state
— The __set_state handler
DateTime::setDate
— Sets the date
DateTime::setISODate
— Sets the ISO date
DateTime::setTime
— Sets the time
DateTime::setTimestamp
— Sets the date and time based on an Unix timestamp
DateTime::setTimezone
— Sets the time zone for the DateTime object
DateTime::sub
— Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
DateTimeImmutable
— The DateTimeImmutable class
DateTimeImmutable::add
— Returns a new object, with added amount of days, months, years, hours, minutes and seconds
DateTimeImmutable::__construct
— Returns new DateTimeImmutable object
DateTimeImmutable::createFromFormat
— Parses a time string according to a specified format
DateTimeImmutable::createFromInterface
— Returns new DateTimeImmutable object encapsulating the given DateTimeInterface object
DateTimeImmutable::createFromMutable
— Returns new DateTimeImmutable instance encapsulating the given DateTime object
DateTimeImmutable::getLastErrors
— Returns the warnings and errors
DateTimeImmutable::modify
— Creates a new object with modified timestamp
DateTimeImmutable::__set_state
— The __set_state handler
DateTimeImmutable::setDate
— Sets the date
DateTimeImmutable::setISODate
— Sets the ISO date
DateTimeImmutable::setTime
— Sets the time
DateTimeImmutable::setTimestamp
— Sets the date and time based on a Unix timestamp
DateTimeImmutable::setTimezone
— Sets the time zone
DateTimeImmutable::sub
— Subtracts an amount of days, months, years, hours, minutes and seconds
DateTimeInterface
— The DateTimeInterface interface
DateTimeInterface::diff
— Returns the difference between two DateTime objects
DateTimeInterface::format
— Returns date formatted according to given format
DateTimeInterface::getOffset
— Returns the timezone offset
DateTimeInterface::getTimestamp
— Gets the Unix timestamp
DateTimeInterface::getTimezone
— Return time zone relative to given DateTime
DateTime::__wakeup
— The __wakeup handler
DateTimeZone
— The DateTimeZone class
DateTimeZone::__construct
— Creates new DateTimeZone object
DateTimeZone::getLocation
— Returns location information for a timezone
DateTimeZone::getName
— Returns the name of the timezone
DateTimeZone::getOffset
— Returns the timezone offset from GMT
DateTimeZone::getTransitions
— Returns all transitions for the timezone
DateTimeZone::listAbbreviations
— Returns associative array containing dst, offset and the timezone name
DateTimeZone::listIdentifiers
— Returns a numerically indexed array containing all defined timezone identifiers
DateInterval
— The DateInterval class
DateInterval::__construct
— Creates a new DateInterval object
DateInterval::createFromDateString
— Sets up a DateInterval from the relative parts of the string
DateInterval::format
— Formats the interval
DatePeriod
— The DatePeriod class
DatePeriod::__construct
— Creates a new DatePeriod object
DatePeriod::createFromISO8601String
— Creates a new DatePeriod object from an ISO8601 string
DatePeriod::getDateInterval
— Gets the interval
DatePeriod::getEndDate
— Gets the end date
DatePeriod::getRecurrences
— Gets the number of recurrences
DatePeriod::getStartDate
— Gets the start date
Date/Time Funzioni
checkdate
— Valida una data gregoriana
date
— Formatta un timestamp Unix
date_add
— Alias di DateTime::add
date_create
— create a new DateTime object
date_create_from_format
— Alias di DateTime::createFromFormat
date_create_immutable
— create a new DateTimeImmutable object
date_create_immutable_from_format
— Alias di DateTimeImmutable::createFromFormat
date_date_set
— Alias di 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 functions in a script
date_diff
— Alias di DateTime::diff
date_format
— Alias di DateTime::format
date_get_last_errors
— Alias di DateTimeImmutable::getLastErrors
date_interval_create_from_date_string
— Alias di DateInterval::createFromDateString
date_interval_format
— Alias di DateInterval::format
date_isodate_set
— Alias di DateTime::setISODate
date_modify
— Alias di DateTime::modify
date_offset_get
— Alias di DateTime::getOffset
date_parse
— Returns associative array with detailed info about given date/time
date_parse_from_format
— Get info about given date formatted according to the specified format
date_sub
— Alias di DateTime::sub
date_sun_info
— Returns an array with information about sunset/sunrise and 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 di DateTime::setTime
date_timestamp_get
— Alias di DateTime::getTimestamp
date_timestamp_set
— Alias di DateTime::setTimestamp
date_timezone_get
— Alias di DateTime::getTimezone
date_timezone_set
— Alias di DateTime::setTimezone
getdate
— Restituisce informazioni sulla data/orario
gettimeofday
— Restituisce l'orario attuale
gmdate
— Formatta una data/ora GMT/UTC
gmmktime
— Riceve l'UNIX timestamp per una data GMT
gmstrftime
— Formatta una data/ora GMT/UTC secondo i parametri locali
idate
— Format a local time/date part as integer
localtime
— Riceve l'orario locale
microtime
— Restituisce l'attuale UNIX timestamp con i microsecondi
mktime
— Restituisce la UNIX timestamp per una data
strftime
— Formatta una data/orario locale accordandola/o alle impostazioni locali according to locale settings
strptime
— Parse a time/date generated with strftime
strtotime
— Analizza qualsiasi descrizione datetime testuale inglese e la converte in uno Unix timestamp
time
— Restituisce l'attuale UNIX timestamp
timezone_abbreviations_list
— Alias di DateTimeZone::listAbbreviations
timezone_identifiers_list
— Alias di DateTimeZone::listIdentifiers
timezone_location_get
— Alias di DateTimeZone::getLocation
timezone_name_from_abbr
— Returns a timezone name by guessing from abbreviation and UTC offset
timezone_name_get
— Alias di DateTimeZone::getName
timezone_offset_get
— Alias di DateTimeZone::getOffset
timezone_open
— Alias di DateTimeZone::__construct
timezone_transitions_get
— Alias di DateTimeZone::getTransitions
timezone_version_get
— Gets the version of the timezonedb
Date/Time Errors and Exceptions
Supported Date and Time Formats
elenco delle Timezone supportate
Africa
America
Antartide
Artico
Asia
Atlantico
Australia
Europa
Indiano
Pacifico
Altri
DateError
— The DateError class
DateObjectError
— The DateObjectError class
DateRangeError
— The DateRangeError class
DateException
— The DateException class
DateInvalidOperationException
— The DateInvalidOperationException class
DateInvalidTimeZoneException
— The DateInvalidTimeZoneException class
DateMalformedIntervalStringException
— The DateMalformedIntervalStringException class
DateMalformedPeriodStringException
— The DateMalformedPeriodStringException class
DateMalformedStringException
— The DateMalformedStringException class
Improve This Page
Learn How To Improve This Page
•
Submit a Pull Request
•
Report a Bug
+
add a note
User Contributed Notes
There are no user contributed notes for this page.
↑
and
↓
to navigate •
Enter
to select •
Esc
to close
Press
Enter
without selection to search using Google