{
    "content": [
        {
            "type": "text",
            "text": "# Date::Manip::Obj (perldoc)\n\n## NAME\n\nDate::Manip::Obj - Base class for Date::Manip objects\n\n## SYNOPSIS\n\nThe Date::Manip::Obj class is the base class used for the following Date::Manip classes:\nDate::Manip::Base\nDate::Manip::TZ\nDate::Manip::Date\nDate::Manip::Delta\nDate::Manip::Recur\nThis module is not intended to be called directly and performs no useful function by itself.\nInstead, use the various derived classes which inherit from it.\n\n## DESCRIPTION\n\nThis module contains a set of methods used by all Date::Manip classes listed above.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS FOR CREATING OBJECTS**\n- **OTHER METHODS**\n- **KNOWN BUGS**\n- **BUGS AND QUESTIONS**\n- **SEE ALSO**\n- **LICENSE**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Date::Manip::Obj",
        "section": "",
        "mode": "perldoc",
        "summary": "Date::Manip::Obj - Base class for Date::Manip objects",
        "synopsis": "The Date::Manip::Obj class is the base class used for the following Date::Manip classes:\nDate::Manip::Base\nDate::Manip::TZ\nDate::Manip::Date\nDate::Manip::Delta\nDate::Manip::Recur\nThis module is not intended to be called directly and performs no useful function by itself.\nInstead, use the various derived classes which inherit from it.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "METHODS FOR CREATING OBJECTS",
                "lines": 143,
                "subsections": []
            },
            {
                "name": "OTHER METHODS",
                "lines": 56,
                "subsections": []
            },
            {
                "name": "KNOWN BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS AND QUESTIONS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Date::Manip::Obj - Base class for Date::Manip objects\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "The Date::Manip::Obj class is the base class used for the following Date::Manip classes:\n\nDate::Manip::Base\nDate::Manip::TZ\nDate::Manip::Date\nDate::Manip::Delta\nDate::Manip::Recur\n\nThis module is not intended to be called directly and performs no useful function by itself.\nInstead, use the various derived classes which inherit from it.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module contains a set of methods used by all Date::Manip classes listed above.\n\nYou should be familiar with the Date::Manip::Objects and Date::Manip::Config documentation.\n\nIn the method descriptions below, Date::Manip::Date objects will usually be used as examples,\nbut (unless otherwise stated), all of the classes listed above have the same methods, and work\nin the same fashion.\n",
                "subsections": []
            },
            "METHODS FOR CREATING OBJECTS": {
                "content": "In the examples below, any variable named some variation of $date ($date, $date1, $date2, ...)\nis a Date::Manip::Date object. Similarly, $delta, $recur, $tz, and $base refer to objects in the\nappropriate class.\n\nAny $obj variable refers to an object in any of the classes.\n\nnew There are two ways to use the new method. They are:\n\n$obj2  = new CLASS ($obj1,$string,@parseopts,\\@opts);\n$obj2  = $obj1->new($string,@parseopts,\\@opts)\n\nIn both cases, all arguments are optional.\n\nBoth methods are used to create a new object of a given class. In the first case, CLASS is\nthe class of the new object. For example:\n\n$date  = new Date::Manip::Date;\n$delta = new Date::Manip::Delta;\n\nIn the second method, the class of the new object will be derived from the first object. For\nexample:\n\n$date1 = new Date::Manip::Date;\n$date2 = $date1->new();\n\nthe class of the second object ($date2) is Date::Manip::Date because that is the class of\nthe object ($date1) used to create it.\n\nIn both first method (when a $obj1 is passed in) and always in the second method, the new\nobject will share as much information from the old object ($obj1) as possible.\n\nFor example, if you call either of these:\n\n$date2 = new Date::Manip::Date $date1;\n$date2 = $date1->new();\n\nthe new date object will use the same embedded Date::Manip::TZ and Date::Manip::Base\nobjects.\n\nWhen specifying CLASS and including an old object, objects do not need to be of the same\nclass. For example, the following are all valid:\n\n$date = new Date::Manip::Date $delta;\n$date = new Date::Manip::Date $tz;\n\nYou can even do:\n\n$date = new Date::Manip::Date $base;\n\nbut this will have to create a completely new Date::Manip::TZ object, which means that\noptimal performance may not be achieved if a Date::Manip::TZ object already exists.\n\nThere are two special cases. Either of the following will create a new Date::Manip::Base\nobject for handling multiple configurations:\n\n$base2 = new Date::Manip::Base $base1;\n$base2 = $base1->new();\n\nEither of the following will create a new Date::Manip::TZ object with the same\nDate::Manip::Base object embedded in it:\n\n$tz2   = new Date::Manip::TZ $tz1;\n$tz2   = $tz1->new();\n\nThe new base object will initially have the same configuration as the original base object,\nbut changing it's configuration will not affect the original base object.\n\nIf the \"\\@opts\" argument is passed in, it is a list reference containing a list suitable for\npassing to the config method (described below). In this case, a new Date::Manip::Base object\n(and perhaps Date::Manip::TZ object) will be created. The new Base object will start as\nidentical to the original one (if a previously defined object was used to create the new\nobject) with the additional options in @opts added.\n\nIn other words, the following are equivalent:\n\n$date  = new Date::Manip::Date $obj,\\@opts;\n\n$base  = $obj->base();\n$base2 = $base->new();\n$date = new Date::Manip::Date $base2;\n$date->config(@opts);\n\nIt should be noted that the options are applied to the NEW Date::Manip::Base object, not the\nold one.\n\nAn optional string ($string and parse opts @parseopts) may be passed in only when creating\na Date::Manip::Date, Date::Manip::Delta, or Date::Manip::Recur object. If passed in when\ncreating a Date::Manip::TZ or Date::Manip::Base object, a warning will be issued, but\nexecution will continue.\n\nIf the string is included, it will be parsed to give an initial value to the object. This\nwill only be done AFTER any options are handled, so the following are equivalent:\n\n$date = new Date::Manip::Date $string,@parseopts,\\@opts;\n\n$date = new Date::Manip::Date;\n$date->config(@opts);\n$date->parse($string,@parseopts);\n\nOnce a Date::Manip::Date object (or any object in any other Date::Manip class) is created,\nit should always be used to create additional objects in order to preserve cached data for\noptimal performance and memory usage.\n\nThe one caveat is if you are working with multiple configurations as described in the\nDate::Manip::Objects document. In that case, you may need to create completely new objects\nto allow multiple Date::Manip::Base objects to be used.\n\nnewconfig\n$obj2 = $obj1->newconfig($string,\\@opts);\n\nThis creates a new instance with a new Date::Manip::Base object (and possibly a new\nDate::Manip::TZ object).\n\nFor example,\n\n$date2 = $date1->newconfig();\n\ncreates a new Date::Manip::Date object with a new Date::Manip::TZ (and Date::Manip::Base)\nobject. Initially, it is the same configuration as the original object.\n\nIf the object is a Date::Manip::Base object, the following are equivalent:\n\n$base2 = $base1->newconfig();\n\n$base2 = $base1->new();\n\nBoth $string and \"\\@opts\" are optional. They are used in the same way they are used in the\nnew method.\n\nnewdate\nnewdelta\nnewrecur\nThese are shortcuts for specifying the class. The following sets of calls are all\nequivalent:\n\n$date  = $obj->newdate();\n$date  = new Date::Manip::Date($obj);\n\n$delta = $obj->newdelta();\n$delta = new Date::Manip::Date($obj);\n\nThese methods all allow optional \"($string,\\@opts)\" arguments.\n",
                "subsections": []
            },
            "OTHER METHODS": {
                "content": "base\ntz\n$base = $obj->base();\n\nThis returns the Date::Manip::Base object associated with the given object.\n\nIf $obj is a Date::Manip::Base object, nothing is returned (i.e. it doesn't create a new\ncopy of the object).\n\n$tz = $obj->tz();\n\nThis returns the Date::Manip::TZ object associated with the given object. If $obj is a\nDate::Manip::TZ or Date::Manip::Base object, nothing is returned.\n\nconfig\n$obj->config($var1,$val1,$var2,$val2,...);\n\nThis will set the value of any configuration variables. Please refer to the\nDate::Manip::Config manual for a list of all configuration variables and their description.\n\ngetconfig\n@var = $obj->getconfig();\n$val = $obj->getconfig($var1);\n@val = $obj->getconfig($var1,$var2,...);\n\nThis queries the current config values. With no argument, it will return the list of config\nvariables (all lowercase).\n\nWith one or more arguments, it returns the current values for the config variables passed in\n(case insensitive).\n\nerr\n$err = $obj->err();\n\nThis will return the full error message if the previous operation failed for any reason.\n\n$obj->err(1);\n\nwill clear the error code.\n\nisdate\nisdelta\nisrecur\n$flag = $obj->isdate();\n\nReturns 0 or 1, depending on the object. For example, a Date::Manip::Date object returns 1\nwith the isdate method, and 0 for the other two.\n\nversion\n$vers = $obj->version($flag);\n\nThis returns the version of Date::Manip.\n\nIf $flag is passed in, and $obj is not a Date::Manip::Base object, the version and timezone\ninformation will be passed back.\n",
                "subsections": []
            },
            "KNOWN BUGS": {
                "content": "None known.\n",
                "subsections": []
            },
            "BUGS AND QUESTIONS": {
                "content": "Please refer to the Date::Manip::Problems documentation for information on submitting bug\nreports or questions to the author.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Date::Manip - main module documentation\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "This script is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Sullivan Beck (sbeck@cpan.org)\n",
                "subsections": []
            }
        }
    }
}