Annonce : Tous les projets non commerciaux enregistrés pour utiliser Earth Engine avant le 15 avril 2025 doivent vérifier leur éligibilité non commerciale pour conserver leur accès à Earth Engine.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/06/24 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/06/24 (UTC)."],[[["`Date.difference()` calculates the difference between two dates, returning a floating-point number."],["The difference is calculated based on the average length of the specified unit (e.g., 'year', 'month', 'week', 'day', 'hour', 'minute', or 'second')."],["The function takes two `ee.Date` objects as input, representing the start and end points for the calculation."],["The result is relative to the first date and can be positive or negative depending on the order of the dates."]]],["`Date.difference` calculates the difference between two dates, returning a floating-point number based on the average length of the specified unit. The function takes a `start` date and a `unit` string ('year', 'month', 'week', 'day', 'hour', 'minute', or 'second') as arguments. The output represents the difference in the chosen unit. Examples show calculating differences in days and weeks between two dates, showcasing both JavaScript and Python implementations.\n"]]