Open in the explorer

Century interpretation for Year 2000

Interprétation du siècle pour l’an 2000

Type
User
GPO path
User Configuration › Policies › Administrative Templates › System FR: Configuration utilisateur › Stratégies › Modèles d'administration › Système
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
Globalization.admx
Internal name
Globalization/Y2K

Explanation

This policy setting determines how programs interpret two-digit years.

This policy setting affects only the programs that use this Windows feature to interpret two-digit years. If a program does not interpret two-digit years correctly, consult the documentation or manufacturer of the program.

If you enable this policy setting, the system specifies the largest two-digit year interpreted as being preceded by 20. All numbers less than or equal to the specified value are interpreted as being preceded by 20. All numbers greater than the specified value are interpreted as being preceded by 19.

For example, the default value, 2029, specifies that all two-digit years less than or equal to 29 (00 to 29) are interpreted as being preceded by 20, that is 2000 to 2029. Conversely, all two-digit years greater than 29 (30 to 99) are interpreted as being preceded by 19, that is, 1930 to 1999.

If you disable or do not configure this policy setting, Windows does not interpret two-digit year formats using this scheme for the program.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine la manière dont les programmes interprètent les années sur deux chiffres.

Ce paramètre de stratégie n’a d’incidence que sur les programmes utilisant la fonction Windows d’interprétation des années sur deux chiffres. Si un programme n’interprète pas les années sur deux chiffres correctement, consultez la documentation ou l’éditeur du programme.

Si vous activez ce paramètre de stratégie, le système spécifie l’année à deux chiffres la plus grande interprétée comme étant précédée par 20. Tous les nombres inférieurs ou égaux à la valeur spécifiée sont interprétés comme étant précédés par 20. Tous les nombres supérieurs à la valeur spécifiée sont interprétés comme étant précédés par 19.

Par exemple, la valeur par défaut, 2029, spécifie que toutes les années sur deux chiffres inférieures ou égales à 29 (00 à 29) sont interprétées comme étant précédées par 20, c’est-à-dire 2000 à 2029. Inversement, toutes les années supérieures à 29 (30 à 99) sont interprétées comme étant précédées par 19, c’est-à-dire, 1930 à 1999.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, Windows n’interprète pas les années à deux chiffres en utilisant ce schéma pour le programme.

Registry

HKEY_CURRENT_USER\Software\Policies\Microsoft\Control Panel\International\Calendars\TwoDigitYearMax
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: Globalization/Y2K
$k = 'HKCU:\Software\Policies\Microsoft\Control Panel\International\Calendars\TwoDigitYearMax'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Year
Set-ItemProperty -Path $k -Name '1' -Value '2029' -Type String  # between 2001 and 2099

Disable

# Disable: Globalization/Y2K
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": Globalization/Y2K
$k = 'HKCU:\Software\Policies\Microsoft\Control Panel\International\Calendars\TwoDigitYearMax'
Remove-ItemProperty -Path $k -Name '1' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
YearAnnéeY2KYearNumeric boxdecimal1REG_SZ
Min: 2001 · Max: 2099 · Default (UI): 2029

Availability