kalenteri
Tässä on erilaisia kalenteriin liityviä funktiota/ komentoja!
| Funktio | Selite | Esimerkki |
|---|---|---|
| cal_days_in_month() | Returns the number of days in a month for a specified year and calendar | Esim |
| cal_from_jd() | Converts a Julian Day Count into a date of a specified calendar | Esim |
| cal_info() | Returns information about a specified calendar | Esim |
| cal_to_jd() | Converts a date in a specified calendar to Julian Day Count | Esim |
| easter_date() | Returns the Unix timestamp for midnight on Easter of a specified year | Esim |
| easter_days() | Returns the number of days after March 21, that the Easter Day is in a specified year | Esim |
| frenchtojd() | Converts a French Republican date to a Julian Day Count | Esim |
| gregoriantojd() | Converts a Gregorian date to a Julian Day Count | Esim |
| jddayofweek() | Returns the day of the week | Esim |
| jdmonthname() | Returns a month name | Esim |
| jdtofrench() | Converts a Julian Day Count to a French Republican date | Esim |
| jdtogregorian() | Converts a Julian Day Count to a Gregorian date | Esim |
| jdtojewish() | Converts a Julian Day Count to a Jewish date | Esim |
| jdtojulian() | Converts a Julian Day Count to a Julian date | Esim |
| jdtounix() | Converts Julian Day Count to Unix timestamp | Esim |
| jewishtojd() | Converts a Jewish date to a Julian Day Count | Esim |
| juliantojd() | Converts a Julian date to a Julian Day Count | Esim |
| unixtojd() | Converts Unix timestamp to Julian Day Count | Esim |
| Funktio | Tyyppi | PHP versio | Esimerkki |
|---|---|---|---|
| CAL_GREGORIAN | Integer | PHP 4 | Esim |
| CAL_JULIAN | Integer | PHP 4 | Esim |
| CAL_JEWISH | Integer | PHP 4 | Esim |
| CAL_FRENCH | Integer | PHP 4 | Esim |
| CAL_NUM_CALS | Integer | PHP 4 | Esim |
| CAL_DOW_DAYNO | Integer | PHP 4 | Esim |
| CAL_DOW_SHORT | Integer | PHP 4 | Esim |
| CAL_DOW_LONG | Integer | PHP 4 | Esim |
| CAL_MONTH_GREGORIAN_SHORT | Integer | PHP 4 | Esim |
| CAL_MONTH_GREGORIAN_LONG | Integer | PHP 4 | Esim |
| CAL_MONTH_JULIAN_SHORT | Integer | PHP 4 | Esim |
| CAL_MONTH_JULIAN_LONG | Integer | PHP 4 | Esim |
| CAL_MONTH_JEWISH | Integer | PHP 4 | Esim |
| CAL_MONTH_FRENCH | Integer | PHP 4 | Esim |
| CAL_EASTER_DEFAULT | Integer | PHP 4.3 | Esim |
| CAL_EASTER_ROMAN | Integer | PHP 4.3 | Esim |
| CAL_EASTER_ALWAYS_GREGORIAN | Integer | PHP 4.3 | Esim |
| CAL_EASTER_ALWAYS_JULIAN | Integer | PHP 4.3 | Esim |
| CAL_JEWISH_ADD_ALAFIM_GERESH | Integer | PHP 5.0 | Esim |
| CAL_JEWISH_ADD_ALAFIM | Integer | PHP 5.0 | Esim |
| CAL_JEWISH_ADD_GERESHAYIM | Integer | PHP 5.0 | Esim |
Aika ja päivä
Tässä on erilaisia Aikaan ja päivään liityviä funktiota/ komentoja!
| Nimi | Selite | Oletus | PHP Versio | Esimerkki |
|---|---|---|---|---|
| date.timezone | The default timezone (used by all date/time functions) | "" | PHP 5.1 | Esim |
| date.default_latitude | The default latitude (used by date_sunrise() and date_sunset()) | "31.7667" | PHP 5.0 | Esim |
| date.default_longitude | The default longitude (used by date_sunrise() and date_sunset()) | "35.2333" | PHP 5.0 | Esim |
| date.sunrise_zenith | The default sunrise zenith (used by date_sunrise() and date_sunset()) | "90.83" | PHP 5.0 | Esim |
| date.sunset_zenith | The default sunset zenith (used by date_sunrise() and date_sunset()) | "90.83" | PHP 5.0 | Esim |
| Funktio | Selite | Esimerkki |
|---|---|---|
| checkdate() | Validates a Gregorian date | Esim |
| date_add() | Adds days, months, years, hours, minutes, and seconds to a date | Esim |
| date_create_from_format() | Returns a new DateTime object formatted according to a specified format | Esim |
| date_create() | Returns a new DateTime object | Esim |
| date_date_set() | Sets a new date | Esim |
| date_default_timezone_get() | Returns the default timezone used by all date/time functions | Esim |
| date_default_timezone_set() | Sets the default timezone used by all date/time functions | Esim |
| date_diff() | Returns the difference between two dates | Esim |
| date_format() | Returns a date formatted according to a specified format | Esim |
| date_get_last_errors() | Returns the warnings/errors found in a date string | Esim |
| date_interval_create_from_date_string() | Sets up a DateInterval from the relative parts of the string | Esim |
| date_interval_format() | Formats the interval | Esim |
| date_isodate_set() | Sets the ISO date | Esim |
| date_modify() | Modifies the timestamp | Esim |
| date_offset_get() | Returns the timezone offset | Esim |
| date_parse_from_format() | Returns an associative array with detailed info about a specified date, according to a specified format | Esim |
| date_parse() | Returns an associative array with detailed info about a specified date | Esim |
| date_sub() | Subtracts days, months, years, hours, minutes, and seconds from a date | Esim |
| date_sun_info() | Returns an array containing info about sunset/sunrise and twilight begin/end, for a specified day and location | Esim |
| date_sunrise() | Returns the sunrise time for a specified day and location | Esim |
| date_sunset() | Returns the sunset time for a specified day and location | Esim |
| date_time_set() | Sets the time | Esim |
| date_timestamp_get() | Returns the Unix timestamp | Esim |
| date_timestamp_set() | Sets the date and time based on a Unix timestamp | Esim |
| date_timezone_get() | Returns the time zone of the given DateTime object | Esim |
| date_timezone_set() | Sets the time zone for the DateTime object | Esim |
| date() | Formats a local date and time | Esim |
| getdate() | Returns date/time information of a timestamp or the current local date/time | Esim |
| gettimeofday() | Returns the current time | Esim |
| gmdate() | Formats a GMT/UTC date and time | Esim |
| gmmktime() | Returns the Unix timestamp for a GMT date | Esim |
| gmstrftime() | Formats a GMT/UTC date and time according to locale settings | Esim |
| idate() | Formats a local time/date as integer | Esim |
| localtime() | Returns the local time | Esim |
| microtime() | Returns the current Unix timestamp with microseconds | Esim |
| mktime() | Returns the Unix timestamp for a date | Esim |
| strftime() | Formats a local time and/or date according to locale settings | Esim |
| strptime() | Parses a time/date generated with strftime() | Esim |
| strtotime() | Parses an English textual datetime into a Unix timestamp | Esim |
| time() | Returns the current time as a Unix timestamp | Esim |
| timezone_abbreviations_list() | Returns an associative array containing dst, offset, and the timezone name | Esim |
| timezone_identifiers_list() | Returns an indexed array with all timezone identifiers | Esim |
| timezone_location_get() | Returns location information for a specified timezone | Esim |
| timezone_name_from_ abbr() | Returns the timezone name from abbreviation | Esim |
| timezone_name_get() | Returns the name of the timezone | Esim |
| timezone_offset_get() | Returns the timezone offset from GMT | Esim |
| timezone_open() | Creates new DateTimeZone object | Esim |
| timezone_transitions_get() | Returns all transitions for the timezone | Esim |
| timezone_version_get() | Returns the version of the timezone db | Esim |
| Funktio | Selite | Esimerkki |
|---|---|---|
| DATE_ATOM | Atom (example: 2005-08-15T16:13:03+0000) | |
| DATE_COOKIE | HTTP Cookies (example: Sun, 14 Aug 2005 16:13:03 UTC) | Esim |
| DATE_ISO8601 | ISO-8601 (example: 2005-08-14T16:13:03+0000) | Esim |
| DATE_RFC822 | RFC 822 (example: Sun, 14 Aug 2005 16:13:03 UTC) | Esim |
| DATE_RFC850 | RFC 850 (example: Sunday, 14-Aug-05 16:13:03 UTC) | Esim |
| DATE_RFC1036 | RFC 1036 (example: Sunday, 14-Aug-05 16:13:03 UTC) | Esim |
| DATE_RFC1123 | RFC 1123 (example: Sun, 14 Aug 2005 16:13:03 UTC) | Esim |
| DATE_RFC2822 | RFC 2822 (Sun, 14 Aug 2005 16:13:03 +0000) | Esim |
| DATE_RSS | RSS (Sun, 14 Aug 2005 16:13:03 UTC) | Esim |
| DATE_W3C | World Wide Web Consortium (example: 2005-08-14T16:13:03+0000) | Esim |
Timezones
Tässä on erilaisia timezones funktiota/ komentoja!
PHP Supported Timezones
Below is a complete list of the timezones supported by PHP, which are useful with several PHP date functions.
Africa
| Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara |
| Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau |
| Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca |
| Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti |
| Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare |
| Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali |
| Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda |
| Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru |
| Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena |
| Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome |
| Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek |
America
| America/Adak | America/Anchorage | America/Anguilla |
| America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires |
| America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba |
| America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza |
| America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan |
| America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia |
| America/Aruba | America/Asuncion | America/Atikokan |
| America/Atka | America/Bahia | America/Bahia_Banderas |
| America/Barbados | America/Belem | America/Belize |
| America/Blanc-Sablon | America/Boa_Vista | America/Bogota |
| America/Boise | America/Buenos_Aires | America/Cambridge_Bay |
| America/Campo_Grande | America/Cancun | America/Caracas |
| America/Catamarca | America/Cayenne | America/Cayman |
| America/Chicago | America/Chihuahua | America/Coral_Harbour |
| America/Cordoba | America/Costa_Rica | America/Creston |
| America/Cuiaba | America/Curacao | America/Danmarkshavn |
| America/Dawson | America/Dawson_Creek | America/Denver |
| America/Detroit | America/Dominica | America/Edmonton |
| America/Eirunepe | America/El_Salvador | America/Ensenada |
| America/Fort_Wayne | America/Fortaleza | America/Glace_Bay |
| America/Godthab | America/Goose_Bay | America/Grand_Turk |
| America/Grenada | America/Guadeloupe | America/Guatemala |
| America/Guayaquil | America/Guyana | America/Halifax |
| America/Havana | America/Hermosillo | America/Indiana/Indianapolis |
| America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg |
| America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes |
| America/Indiana/Winamac | America/Indianapolis | America/Inuvik |
| America/Iqaluit | America/Jamaica | America/Jujuy |
| America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello |
| America/Knox_IN | America/Kralendijk | America/La_Paz |
| America/Lima | America/Los_Angeles | America/Louisville |
| America/Lower_Princes | America/Maceio | America/Managua |
| America/Manaus | America/Marigot | America/Martinique |
| America/Matamoros | America/Mazatlan | America/Mendoza |
| America/Menominee | America/Merida | America/Metlakatla |
| America/Mexico_City | America/Miquelon | America/Moncton |
| America/Monterrey | America/Montevideo | America/Montreal |
| America/Montserrat | America/Nassau | America/New_York |
| America/Nipigon | America/Nome | America/Noronha |
| America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem |
| America/Ojinaga | America/Panama | America/Pangnirtung |
| America/Paramaribo | America/Phoenix | America/Port-au-Prince |
| America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho |
| America/Puerto_Rico | America/Rainy_River | America/Rankin_Inlet |
| America/Recife | America/Regina | America/Resolute |
| America/Rio_Branco | America/Rosario | America/Santa_Isabel |
| America/Santarem | America/Santiago | America/Santo_Domingo |
| America/Sao_Paulo | America/Scoresbysund | America/Shiprock |
| America/Sitka | America/St_Barthelemy | America/St_Johns |
| America/St_Kitts | America/St_Lucia | America/St_Thomas |
| America/St_Vincent | America/Swift_Current | America/Tegucigalpa |
| America/Thule | America/Thunder_Bay | America/Tijuana |
| America/Toronto | America/Tortola | America/Vancouver |
| America/Virgin | America/Whitehorse | America/Winnipeg |
| America/Yakutat | America/Yellowknife |
Antarctica
| Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson |
| Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa |
| Antarctica/Vostok |
Arctic
| Arctic/Longyearbyen |
Asia
| Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau |
| Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Baghdad | Asia/Bahrain |
| Asia/Baku | Asia/Bangkok | Asia/Beirut | Asia/Bishkek | Asia/Brunei |
| Asia/Calcutta | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo |
| Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai |
| Asia/Dushanbe | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh |
| Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta |
| Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi |
| Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata |
| Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao |
| Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat |
| Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral |
| Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qyzylorda |
| Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand |
| Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Taipei | Asia/Tashkent |
| Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu |
| Asia/Tokyo | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi |
| Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yekaterinburg |
| Asia/Yerevan |
Atlantic
| Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe |
| Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia |
| Atlantic/St_Helena | Atlantic/Stanley |
Australia
| Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra |
| Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI |
| Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/North | Australia/NSW |
| Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania |
| Australia/Victoria | Australia/West | Australia/Yancowinna |
Europe
| Europe/Amsterdam | Europe/Andorra | Europe/Athens | Europe/Belfast | Europe/Belgrade |
| Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest |
| Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar |
| Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey |
| Europe/Kaliningrad | Europe/Kiev | Europe/Lisbon | Europe/Ljubljana | Europe/London |
| Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk |
| Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris |
| Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara |
| Europe/San_Marino | Europe/Sarajevo | Europe/Simferopol | Europe/Skopje | Europe/Sofia |
| Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Uzhgorod |
| Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd |
| Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich |
Indian
| Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro |
| Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte |
| Indian/Reunion |
Pacific
| Pacific/Apia | Pacific/Auckland | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter |
| Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti |
| Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu |
| Pacific/Johnston | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro |
| Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk |
| Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei |
| Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa |
| Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake |
| Pacific/Wallis | Pacific/Yap |