Metadata-Version: 2.1
Name: datify
Version: 1.0.1
Summary: Module that allows extracting valid date from user input.
Home-page: https://github.com/MitryP/datify
Author: Dmitry Popov
Author-email: thedmitryp@ukr.net
License: Apache-2.0
Download-URL: https://github.com/MitryP/datify/archive/refs/tags/1.01.tar.gz
Description: # Datify
        This Python3 module allows to extract parts of valid date from user input.
        User input is processed through class `Datify`.
        ## Languages supported: 
        - English
        - Russian - there is russian Readme at project's GitHub.
        - Ukrainian.
        ---
        
        ## Installing
        Simply run `pip install datify` from your command line.
        
        ---
        ## Class:
        ` Datify(user_input, year, month, date) ` : takes str when creating. Also, can take particular parameters like `year`, `month`, and `day` along with user input or without it. If no parameters are given, raises ValueError. **See the section *Formats* to discover default Datify's formats.**
        ### Class methods:
          #### Static:
          1. `findDate(string)` : Takes string. Returns substring with date in General Date format if it is contained in the given string.
          2. `isYear(year)` : Takes str or int. Returns True if given parameter suits year format.
          3. `isDigitMonth(month)` : Takes str or int. Returns True if given parameter suits digit month format.
          4. `isAlphaMonth(string)` : Takes str. Returns True if given string suits months dictionary. *For languages in which there are multiple forms of words it's basically enough to have only the main form of the word in dictionary.*
          5. `getAlphaMonth(string)` :  Takes str. Returns number(int) of month name in given string according to months dictionary. If no month name is found in the string, returns None.
          6. `isDay(day)` : Takes str or int. Returns True if given parameter suits day format.
          7. `isDate(date)` : Takes str or int. Returns True if given parameter suits general date format (See the section *Default formats*).
          8. `isDatePart(string)` : Takes str. Returns True if given string contains at least one of date parts such as day, month, or year.
          9. `_getWordsList(string)` : from given string returns list of words splitted by a found separator in separators list (See the section *Config* on GitHub). If no separators are found, returns None.
        
          #### Instance:
          1. `date()` : returns datetime object from parameters of Datify object. If not all of the necessary parameters are known (`year`, `month`, and `day`), raises TypeError.
          2. `tuple()` : returns tuple from all parameters in format `(day, month, year)`
          3. `date_or_tuple()` : returns datetime object if all of the necessary parameters are known, otherwise returns tuple from all parameters.
          4. `setYear(year)` : Takes str or int. Extracts year from given parameter and sets `year` field of the called Datify object. If given parameter doesn't suit year format, raises ValueError. *If the year is given in shortened format, counts it as 20YY.*
          5. `setMonth(month)` : Takes str or int. Extracts month from given parameter and sets `month` field of the called Datify object. If given parameter doesn't suit month format and doesn't contain any month names, raises ValueError.
          6. `setDay(day)` : Takes str or int. Extracts day from given parameter and sets `day` field of the called Datify object. If given parameter doesn't suit day format, raises ValueError.
        
        ## GitHub
        Extended documentation can be found at [project's GitHub](https://github.com/MitryP/datify)
Keywords: str,string,user-experience,user-input,date,date-strings,datify,alpha-month,month,engligh,russian,ukrainian,natural-language,open-source
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
