IntlCalendar::getActualMaximum

creationdev

Documentation

Référencement web organique
Référencement web organique

300$ CAD

Référencement web stratégique
Référencement web stratégique

1000$ CAD

Conception web standard
Conception web standard

2500$ CAD

Formation référencement web
Formation référencement web

100$ CAD

Conception web extra
Conception web extra

5000$ CAD

Conception web ecommerce
Conception web ecommerce

2500$ CAD

Conception web microsite
Conception web microsite

1000$ CAD

Référencement web expert
Référencement web expert

750$ CAD

Référencement web optimisé
Référencement web optimisé

500$ CAD

Conception d'application web
Conception d'application web

100$ CAD

Méthode

Méthode

IntlCalendar::getActualMaximum

IntlCalendar::getActualMaximum

Page Vue 26 déc. 2018
Page Vue 14 fois

(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)

IntlCalendar::getActualMaximum — The maximum value for a field, considering the objectʼs current time

Description

Style orienté objet

public IntlCalendar::getActualMaximum(int $field): int|false

Style procédural

intlcal_get_actual_maximum(IntlCalendar $calendar, int $field): int|false

Returns a fieldʼs relative maximum value around the current time. The exact semantics vary by field, but in the general case this is the value that would be obtained if one would set the field value into the smallest relative maximum for the field and would increment it until reaching the global maximum or the field value wraps around, in which the value returned would be the global maximum or the value before the wrapping, respectively.

For instance, in the gregorian calendar, the actual maximum value for the day of month would vary between 28 and 31, depending on the month and year of the current time.

Liste de paramètres

calendar

Une instance IntlCalendar.

field

Une constantes de champ date/heure IntlCalendar. Ceux sont des valeurs entières comprises entre 0 et IntlCalendar::FIELD_COUNT.

Valeurs de retour

An int representing the maximum value in the units associated with the given field ou false si une erreur survient.

Exemples

Exemple #1 intlcalendar::getActualMaximum()

<?php
ini_set('date.timezone', 'Europe/Lisbon');

$cal = IntlCalendar::fromDateTime('2013-02-15');
var_dump($cal->getActualMaximum(IntlCalendar::FIELD_DAY_OF_MONTH)); //28

$cal->add(IntlCalendar::FIELD_EXTENDED_YEAR, -1);
var_dump($cal->getActualMaximum(IntlCalendar::FIELD_DAY_OF_MONTH)); //29

L'exemple ci-dessus va afficher :

int(28)
int(29)

Voir aussi

  • intlcalendar::getMaximum() - Get the global maximum value for a field
  • intlcalendar::getLeastMaximum() - Get the smallest local maximum for a field
  • intlcalendar::getActualMinimum() - The minimum value for a field, considering the objectʼs current time


Source : http://www.php.net/
Ref : methode-intlcalendar::getactualmaximum.php




Contact

Contact

Veuillez saisir les infos dans le formulaire d'identification
suivant pour concevoir et référencer votre site.









Veuillez saisir votre message.

Carte d'affaires

Affichage de la carte d'affaires recto/verso.

Carte d'affaires recto
Carte d'affaires verso

Partagez

Partagez

Discussion ayant comme sujet la page IntlCalendar::getActualMaximum.

©2025 creationdev -  F.A.Q. -  Soutien -  Haut de page
THÈMES: