{
    "mode": "perldoc",
    "parameter": "DateTime::Locale::FromData",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3ALocale%3A%3AFromData/json",
    "generated": "2026-06-10T10:48:39Z",
    "synopsis": "my $locale = DateTime::Locale::FromData->new(%lotsofdata)",
    "sections": {
        "NAME": {
            "content": "DateTime::Locale::FromData - Class for locale objects instantiated from pre-defined data\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 1.33\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $locale = DateTime::Locale::FromData->new(%lotsofdata)\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is used to represent locales instantiated from the data in the DateTime::Locale::Data\nmodule.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "This class provides the following methods:\n\n$locale->code\nThe complete locale id, something like \"en-US\".\n\n$locale->languagecode\nThe language portion of the code, like \"en\".\n\n$locale->scriptcode\nThe script portion of the code, like \"Hant\".\n\n$locale->territorycode\nThe territory portion of the code, like \"US\".\n\n$locale->variantcode\nThe variant portion of the code, like \"POSIX\".\n\n$locale->name\nThe locale's complete name, which always includes at least a language component, plus optional\nterritory and variant components. Something like \"English United States\". The value returned\nwill always be in English.\n\n$locale->language\n$locale->script\n$locale->territory\n$locale->variant\nThe relevant component from the locale's complete name, like \"English\" or \"United States\".\n\n$locale->nativename\nThe locale's complete name in localized form as a UTF-8 string.\n\n$locale->nativelanguage\n$locale->nativescript\n$locale->nativeterritory\n$locale->nativevariant\nThe relevant component from the locale's complete native name as a UTF-8 string.\n\n$locale->monthformatwide\n$locale->monthformatabbreviated\n$locale->monthformatnarrow\n$locale->monthstandalonewide\n$locale->monthstandaloneabbreviated\n$locale->monthstandalonenarrow\n$locale->dayformatwide\n$locale->dayformatabbreviated\n$locale->dayformatnarrow\n$locale->daystandalonewide\n$locale->daystandaloneabbreviated\n$locale->daystandalonenarrow\n$locale->quarterformatwide\n$locale->quarterformatabbreviated\n$locale->quarterformatnarrow\n$locale->quarterstandalonewide\n$locale->quarterstandaloneabbreviated\n$locale->quarterstandalonenarrow\n$locale->ampmabbreviated\n$locale->erawide\n$locale->eraabbreviated\n$locale->eranarrow\nThese methods all return an array reference containing the specified data.\n\nThe methods with \"format\" in the name should return strings that can be used a part of a string,\nlike \"the month of July\". The stand alone values are for use in things like calendars as opposed\nto a sentence.\n\nThe narrow forms may not be unique (for example, in the day column heading for a calendar it's\nokay to have \"T\" for both Tuesday and Thursday).\n\nThe wide name should always be the full name of thing in question. The narrow name should be\njust one or two characters.\n\nThese methods return a reference to the data stored in the locale object. If you change this\nreference's contents, this will affect the data in the locale object! You should clone the data\nfirst if you want to modify it.\n\n$locale->dateformatfull\n$locale->dateformatlong\n$locale->dateformatmedium\n$locale->dateformatshort\n$locale->timeformatfull\n$locale->timeformatlong\n$locale->timeformatmedium\n$locale->timeformatshort\n$locale->datetimeformatfull\n$locale->datetimeformatlong\n$locale->datetimeformatmedium\n$locale->datetimeformatshort\nThese methods return strings appropriate for the \"DateTime->formatcldr\" method.\n\n$locale->formatfor($name)\nThese are accessed by passing a name to \"$locale->formatfor(...)\", where the name is a\nCLDR-style format specifier.\n\nThe return value is a string suitable for passing to \"$dt->formatcldr\", so you can do something\nlike this:\n\nprint $dt->formatcldr( $dt->locale->formatfor('MMMdd') )\n\nwhich for the \"en\" locale would print out something like \"08 Jul\".\n\nNote that the localization may also include additional text specific to the locale. For example,\nthe \"MMMMd\" format for the \"zh\" locale includes the Chinese characters for \"day\" (日) and month\n(月), so you get something like \"8月23日\".\n\n$locale->availableformats\nThis should return a list of all the format names that could be passed to \"$locale->formatfor\".\n\nSee the documentation for individual locales for details and examples of these formats. The\nformat names that are available vary by locale.\n\n$locale->glibcdatetimeformat\n$locale->glibcdateformat\n$locale->glibcdate1format\n$locale->glibctimeformat\n$locale->glibctime12format\nThese methods return strings appropriate for the \"DateTime->strftime\" method. However, you are\nstrongly encouraged to use the other format methods, which use the CLDR format data. They are\nprimarily included for the benefit for DateTime::Format::Strptime.\n\n$locale->version\nThe CLDR version from which this locale was generated.\n\n$locale->prefers24hourtime\nReturns a boolean indicating whether or not the locale prefers 24-hour time.\n\n$locale->firstdayofweek\nReturns a number from 1 to 7 indicating the *local* first day of the week, with Monday being 1\nand Sunday being 7.\n\n$locale->localedata\nReturns a clone of the original data used to create this locale as a hash. This is here to\nfacilitate creating custom locales via \"DateTime::Locale-\"registerdatalocale>.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs may be submitted at <https://github.com/houseabsolute/DateTime-Locale/issues>.\n\nThere is a mailing list available for users of this distribution, <mailto:datetime@perl.org>.\n",
            "subsections": []
        },
        "SOURCE": {
            "content": "The source code repository for DateTime-Locale can be found at\n<https://github.com/houseabsolute/DateTime-Locale>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dave Rolsky <autarch@urth.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2003 - 2021 by Dave Rolsky.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
            "subsections": []
        }
    },
    "summary": "DateTime::Locale::FromData - Class for locale objects instantiated from pre-defined data",
    "flags": [],
    "examples": [],
    "see_also": []
}